This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.4.x by this push:
new 7ab1e8f CAMEL-15350: camel-sjms - batch consumer fix recover issue
when any kind of exception is thrown. Thanks to Brad Harvey for reporting and
suggested fix.
7ab1e8f is described below
commit 7ab1e8f02453c5cba73a0f1a7006c019c8ddb16d
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Aug 4 07:22:30 2020 +0200
CAMEL-15350: camel-sjms - batch consumer fix recover issue when any kind of
exception is thrown. Thanks to Brad Harvey for reporting and suggested fix.
---
.../java/org/apache/camel/component/sjms/batch/SjmsBatchConsumer.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchConsumer.java
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchConsumer.java
index cf56b20..0d94deb 100644
---
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchConsumer.java
+++
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchConsumer.java
@@ -321,13 +321,12 @@ public class SjmsBatchConsumer extends DefaultConsumer {
// from a topic as you don't car about message loss,
users can just use a regular aggregator instead
Queue queue = session.createQueue(destinationName);
MessageConsumer consumer =
session.createConsumer(queue);
-
try {
task.consumeBatchesOnLoop(session, consumer);
} finally {
closeJmsConsumer(consumer);
}
- } catch (javax.jms.IllegalStateException ex) {
+ } catch (Exception ex) {
// from consumeBatchesOnLoop
// if keepAliveDelay was not specified (defaults to
-1) just rethrow to break the loop. This preserves original default behavior
if (keepAliveDelay < 0) {