NIFI-11259 Used asAllowableValue() from Failure Strategy

This commit is contained in:
exceptionfactory 2024-06-24 15:44:51 -05:00
parent 24925ed9b5
commit b24973960f
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -406,8 +406,8 @@ public class PublishKafka extends AbstractProcessor implements KafkaPublishCompo
}
private void routeFailureStrategy(final ProcessContext context, final ProcessSession session, final List<FlowFile> flowFiles) {
final String strategy = context.getProperty(FAILURE_STRATEGY).getValue();
if (FailureStrategy.ROLLBACK.getValue().equals(strategy)) {
final FailureStrategy strategy = context.getProperty(FAILURE_STRATEGY).asAllowableValue(FailureStrategy.class);
if (FailureStrategy.ROLLBACK == strategy) {
session.rollback();
context.yield();
} else {