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 12:43:49 GMT
Repository: camel
Updated Branches:
  refs/heads/master 00ed85017 -> e6aefecef


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/302b4649
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/302b4649
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/302b4649

Branch: refs/heads/master
Commit: 302b46493790227bb7ffec5d48c243059d158b6c
Parents: 00ed850
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 20:41:59 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/302b4649/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/302b4649/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