ijokarumawak commented on a change in pull request #3476: NIFI-6022 ConsumeJMS
- Added try/catch to protect against secondary exception in a…
URL: https://github.com/apache/nifi/pull/3476#discussion_r286276474
##########
File path:
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
##########
@@ -126,7 +123,11 @@ public Void doInJms(final Session session) throws
JMSException {
// We need to call recover to ensure that in the event of
// abrupt end or exception the current session will stop
message
// delivery and restart with the oldest unacknowledged
message
- session.recover();
+ try {
+ session.recover();
+ } catch (Exception e1) {
+ // likely the session is closed...just ignore and
press on with initial problem
+ }
Review comment:
This is the only change required to address NIFI-6022. Please keep original
source code as much as possible for easier review cycles.
----------------------------------------------------------------
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]
With regards,
Apache Git Services