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 2019/10/04 06:51:43 UTC

[camel] branch master updated (af1e37e -> 4f85af1)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from af1e37e  Fixed Camel-Salesforce Karaf feature
     new 000938a  CAMEL-14033: Fixed NPE in camel-sjms when doing request/reply and recieving a message that cannot be correlated. Using similar logging as camel-jms does.
     new 8a2f44d  Polished
     new 4f85af1  CAMEL-14033: Update doc to say queues should be used for request/response.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/camel/component/jms/reply/QueueReplyManager.java |  2 +-
 .../camel-sjms/src/main/docs/sjms-batch-component.adoc      |  2 --
 components/camel-sjms/src/main/docs/sjms-component.adoc     |  4 ++--
 .../apache/camel/component/sjms/producer/InOutProducer.java | 13 +++++++++++--
 4 files changed, 14 insertions(+), 7 deletions(-)


[camel] 03/03: CAMEL-14033: Update doc to say queues should be used for request/response.

Posted by da...@apache.org.
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

commit 4f85af176bd2b0c790f9d8e61c35e006e761ad8c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Oct 4 08:50:51 2019 +0200

    CAMEL-14033: Update doc to say queues should be used for request/response.
---
 components/camel-sjms/src/main/docs/sjms-batch-component.adoc | 2 --
 components/camel-sjms/src/main/docs/sjms-component.adoc       | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/components/camel-sjms/src/main/docs/sjms-batch-component.adoc b/components/camel-sjms/src/main/docs/sjms-batch-component.adoc
index 07c3497..371b05d 100644
--- a/components/camel-sjms/src/main/docs/sjms-batch-component.adoc
+++ b/components/camel-sjms/src/main/docs/sjms-batch-component.adoc
@@ -1,8 +1,6 @@
 [[sjms-batch-component]]
 = Simple JMS Batch Component
 
-*Available as of Camel version 2.16*
-
 SJMS Batch is a specialized component for highly performant,
 transactional batch consumption from a JMS queue. It can be thought of
 as a hybrid of a consumer-only component and an
diff --git a/components/camel-sjms/src/main/docs/sjms-component.adoc b/components/camel-sjms/src/main/docs/sjms-component.adoc
index ea633be..f3bc0bb 100644
--- a/components/camel-sjms/src/main/docs/sjms-component.adoc
+++ b/components/camel-sjms/src/main/docs/sjms-component.adoc
@@ -1,8 +1,6 @@
 [[sjms-component]]
 = Simple JMS Component
 
-*Available as of Camel version 2.11*
-
 The Simple JMS Component, or SJMS, is a JMS client for use with Camel
 that uses well known best practices when it comes to JMS client creation
 and configuration. SJMS contains a brand new JMS client API written
@@ -563,6 +561,8 @@ reducing the overhead on the broker since all the messages are consumed
 from the destination in the order they are produced by the interested
 consumer.
 
+NOTE: You should only use queues as destination types, topics is not recommended or fully supported.
+
 Currently the only correlation strategy is to use the `JMSCorrelationId`.
 The _InOut_ Consumer uses this strategy as well ensuring that all
 responses messages to the included `JMSReplyTo` destination also have the


[camel] 02/03: Polished

Posted by da...@apache.org.
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

commit 8a2f44db1f9403558b9a494ad634de90a8efe8ea
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Oct 4 08:48:26 2019 +0200

    Polished
---
 .../java/org/apache/camel/component/jms/reply/QueueReplyManager.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/QueueReplyManager.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/QueueReplyManager.java
index 99f8f73..c4605a6 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/QueueReplyManager.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/QueueReplyManager.java
@@ -147,7 +147,7 @@ public class QueueReplyManager extends ReplyManagerSupport {
             }
             // shared is not as fast as temporary or exclusive, so log this so the end user may be aware of this
             log.warn("{} is using a shared reply queue, which is not as fast as alternatives."
-                    + " See more detail at the section 'Request-reply over JMS' at http://camel.apache.org/jms", endpoint);
+                    + " See more detail at the section 'Request-reply over JMS' in the JMS component documentation", endpoint);
         } else if (ReplyToType.Exclusive == type) {
             answer = new ExclusiveQueueMessageListenerContainer(endpoint);
             // must use cache level consumer for exclusive as there is no message selector


[camel] 01/03: CAMEL-14033: Fixed NPE in camel-sjms when doing request/reply and recieving a message that cannot be correlated. Using similar logging as camel-jms does.

Posted by da...@apache.org.
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

commit 000938a9e22a4b214db8a6b79fc5564e060442b1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Oct 4 08:48:18 2019 +0200

    CAMEL-14033: Fixed NPE in camel-sjms when doing request/reply and recieving a message that cannot be correlated. Using similar logging as camel-jms does.
---
 .../apache/camel/component/sjms/producer/InOutProducer.java | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/producer/InOutProducer.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/producer/InOutProducer.java
index 141583b..5d89d2b 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/producer/InOutProducer.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/producer/InOutProducer.java
@@ -104,8 +104,17 @@ public class InOutProducer extends SjmsProducer {
                         log.debug("Message Received in the Consumer Pool");
                         log.debug("  Message : {}", message);
                         try {
-                            Exchanger<Object> exchanger = EXCHANGERS.get(message.getJMSCorrelationID());
-                            exchanger.exchange(message, getResponseTimeOut(), TimeUnit.MILLISECONDS);
+                            String correlationID = message.getJMSCorrelationID();
+                            Exchanger<Object> exchanger = EXCHANGERS.get(correlationID);
+                            if (exchanger != null) {
+                                exchanger.exchange(message, getResponseTimeOut(), TimeUnit.MILLISECONDS);
+                            } else {
+                                // we could not correlate the received reply message to a matching request and therefore
+                                // we cannot continue routing the unknown message
+                                // log a warn and then ignore the message
+                                log.warn("Reply received for unknown correlationID [{}] on reply destination [{}]. Current correlation map size: {}. The message will be ignored: {}",
+                                        new Object[]{correlationID, replyToDestination, EXCHANGERS.size(), message});
+                            }
                         } catch (Exception e) {
                             log.warn("Unable to exchange message: {}. This exception is ignored.", message, e);
                         }