camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/2] camel git commit: CAMEL-8204 Write Error log if the JMS correlationId is not unique.
Date Sun, 04 Jan 2015 13:22:48 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x 35d26ca72 -> 57d8a765a
  refs/heads/camel-2.14.x 7daa19071 -> cc5fbbb77


CAMEL-8204 Write Error log if the JMS correlationId is not unique.


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

Branch: refs/heads/camel-2.14.x
Commit: cc5fbbb77f3de907057724e63a2f8e1efd0be3c0
Parents: 7daa190
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Sun Jan 4 20:41:59 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Sun Jan 4 21:22:15 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/jms/reply/QueueReplyManager.java   | 3 +++
 .../camel/component/jms/reply/TemporaryQueueReplyManager.java     | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cc5fbbb7/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/QueueReplyManager.java
----------------------------------------------------------------------
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 e8675b9..59513b2 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
@@ -51,6 +51,9 @@ public class QueueReplyManager extends ReplyManagerSupport {
         // add to correlation map
         QueueReplyHandler handler = new QueueReplyHandler(replyManager, exchange, callback,
                 originalCorrelationId, correlationId, requestTimeout);
+        if (correlation.get(correlationId) != null) {
+            log.error("The correlationId [{}] is not unique, some reply message would be
ignored and the request thread could be blocked.", correlationId);
+        }
         correlation.put(correlationId, handler, requestTimeout);
         return correlationId;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc5fbbb7/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
index f7430eb..269b8fe 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
@@ -61,6 +61,9 @@ public class TemporaryQueueReplyManager extends ReplyManagerSupport {
                                 String originalCorrelationId, String correlationId, long
requestTimeout) {
         // add to correlation map
         TemporaryQueueReplyHandler handler = new TemporaryQueueReplyHandler(this, exchange,
callback, originalCorrelationId, correlationId, requestTimeout);
+        if (correlation.get(correlationId) != null) {
+            log.error("The correlationId [{}] is not unique, some reply message would be
ignored and the request thread could be blocked.", correlationId);
+        }
         correlation.put(correlationId, handler, requestTimeout);
         return correlationId;
     }


Mime
View raw message