You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/08/04 05:23:52 UTC
[camel] branch master updated: 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.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 477c8ca 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.
477c8ca is described below
commit 477c8cadfe42d240d874b6eb9a2d26ecd2466355
Author: Claus Ibsen <cl...@gmail.com>
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) {