You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by de...@apache.org on 2018/10/02 15:09:09 UTC

[1/3] nifi git commit: NIFI-3531 Moved session.recover in JMSConsumer to exceptional situations

Repository: nifi
Updated Branches:
  refs/heads/master 895323f3c -> b4c8e0179


NIFI-3531 Moved session.recover in JMSConsumer to exceptional situations


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/83097478
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/83097478
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/83097478

Branch: refs/heads/master
Commit: 8309747889c3187005a0ce4e4c0c11b1e3281e10
Parents: b4894c5
Author: Mike Moser <mo...@apache.org>
Authored: Wed Aug 1 20:11:35 2018 +0000
Committer: Mike Moser <mo...@apache.org>
Committed: Wed Aug 1 20:11:40 2018 +0000

----------------------------------------------------------------------
 .../java/org/apache/nifi/jms/processors/JMSConsumer.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/83097478/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
index 8092277..cf22175 100644
--- a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
+++ b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
@@ -85,10 +85,6 @@ final class JMSConsumer extends JMSWorker {
         this.jmsTemplate.execute(new SessionCallback<Void>() {
             @Override
             public Void doInJms(final Session session) throws JMSException {
-                // We need to call recover to ensure that in in the event of
-                // abrupt end or exception the current session will stop message
-                // delivery and restarts with the oldest unacknowledged message
-                session.recover();
 
                 final MessageConsumer msgConsumer = createMessageConsumer(session, destinationName, durable, shared, subscriberName);
                 try {
@@ -126,6 +122,12 @@ final class JMSConsumer extends JMSWorker {
                     // and if CLIENT_ACKNOWLEDGE is set.
                     consumerCallback.accept(response);
                     acknowledge(message, session);
+                } catch (JMSException e) {
+                    // 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();
+                    throw e;
                 } finally {
                     JmsUtils.closeMessageConsumer(msgConsumer);
                 }


[2/3] nifi git commit: NIFI-3531 Catch and rethrow generic Exception to handle RuntimeExceptions, and allow test to pass This closes #2931. Signed-off-by: Brandon Devries

Posted by de...@apache.org.
NIFI-3531 Catch and rethrow generic Exception to handle RuntimeExceptions, and allow test to pass
This closes #2931.
Signed-off-by: Brandon Devries <de...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/76a9f98d
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/76a9f98d
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/76a9f98d

Branch: refs/heads/master
Commit: 76a9f98d7f43b0b23c7360a2d21ee81f5d19309e
Parents: 8309747
Author: Mike Moser <mo...@apache.org>
Authored: Wed Sep 5 15:49:44 2018 -0400
Committer: Brandon Devries <de...@apache.org>
Committed: Tue Oct 2 11:06:51 2018 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/76a9f98d/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
index cf22175..a2c73b4 100644
--- a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
+++ b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/JMSConsumer.java
@@ -122,7 +122,7 @@ final class JMSConsumer extends JMSWorker {
                     // and if CLIENT_ACKNOWLEDGE is set.
                     consumerCallback.accept(response);
                     acknowledge(message, session);
-                } catch (JMSException e) {
+                } catch (Exception e) {
                     // 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


[3/3] nifi git commit: Merge branch 'pr2931'

Posted by de...@apache.org.
Merge branch 'pr2931'


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/b4c8e017
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/b4c8e017
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/b4c8e017

Branch: refs/heads/master
Commit: b4c8e0179bc4b4e196eac15c7478fed784ee2bdc
Parents: 895323f 76a9f98
Author: Brandon Devries <de...@apache.org>
Authored: Tue Oct 2 11:08:43 2018 -0400
Committer: Brandon Devries <de...@apache.org>
Committed: Tue Oct 2 11:08:43 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/nifi/jms/processors/JMSConsumer.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------