markap14 commented on a change in pull request #5042:
URL: https://github.com/apache/nifi/pull/5042#discussion_r625947742
##########
File path:
nifi-nar-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/ConsumeAMQP.java
##########
@@ -159,8 +158,8 @@ protected void processResource(final Connection connection,
final AMQPConsumer c
}
if (lastReceived != null) {
- session.commit();
- consumer.acknowledge(lastReceived);
+ final GetResponse finalGetResponse = lastReceived;
+ session.commitAsync(() -> consumer.acknowledge(finalGetResponse),
null);
Review comment:
Because it didn't exist when I wrote that line of code :) After I passed
`null` 3-4 times I realized that it would be `null` more often than not so
added the override. Will fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]