[ 
https://issues.apache.org/jira/browse/CAMEL-5309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292288#comment-13292288
 ] 

Vladimir Tsvetkov commented on CAMEL-5309:
------------------------------------------

I'm still reproducing the issue with 2.9-SNAPSHOT.

I expect 5 replies, but instead I receive 2 and 3 are with incorrect 
correlation IDs:
{code}
2012-06-09 12:51:56,231 [Camel (camel-1) thread #13 - 
PersistentQueueReplyManager[completionsQueue]-1] WARN  
org.apache.camel.component.jms.reply.PersistentQueueReplyManager - Reply 
received for unknown correlationID 
[ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-507]. The 
message will be ignored: ActiveMQTextMessage {commandId = 5, responseRequired = 
true, messageId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:2:1:1:1, 
originalDestination = null, originalTransactionId = null, producerId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:2:1:1, 
destination = queue://completionsQueue, transactionId = null, expiration = 0, 
timestamp = 1339235516008, arrival = 0, brokerInTime = 1339235516008, 
brokerOutTime = 1339235516011, correlationId = 
ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-507, replyTo = 
queue://completionsQueue, persistent = true, type = null, priority = 4, groupID 
= null, groupSequence = 0, targetConsumerId = null, compressed = false, userID 
= null, content = null, marshalledProperties = 
org.apache.activemq.util.ByteSequence@300eff0c, dataStructure = null, 
redeliveryCounter = 0, size = 1248, properties = 
{breadcrumbId=ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-500,
 CamelJmsDeliveryMode=2, taskType=processIndexTask}, readOnlyProperties = true, 
readOnlyBody = true, droppable = false, text = 
{"fiscalYear":2011,"indexCompression":"ZIP","..."quarter":3}}
2012-06-09 13:06:29,605 [Camel (camel-1) thread #33 - Threads] INFO  
PROCESS_INDICES_STATE.RESPONSE - Exchange[ExchangePattern:InOut, 
BodyType:String, 
Body:{"fiscalYear":2011,"indexCompression":"ZIP","indexType":"COMPANY","quarter":4}]
2012-06-09 13:16:48,811 [Camel (camel-1) thread #13 - 
PersistentQueueReplyManager[completionsQueue]-1] WARN  
org.apache.camel.component.jms.reply.PersistentQueueReplyManager - Reply 
received for unknown correlationID 
[ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-506]. The 
message will be ignored: ActiveMQTextMessage {commandId = 5, responseRequired = 
true, messageId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:4:1:1:1, 
originalDestination = null, originalTransactionId = null, producerId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:4:1:1, 
destination = queue://completionsQueue, transactionId = null, expiration = 0, 
timestamp = 1339237008806, arrival = 0, brokerInTime = 1339237008806, 
brokerOutTime = 1339237008809, correlationId = 
ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-506, replyTo = 
queue://completionsQueue, persistent = true, type = null, priority = 4, groupID 
= null, groupSequence = 0, targetConsumerId = null, compressed = false, userID 
= null, content = null, marshalledProperties = 
org.apache.activemq.util.ByteSequence@482163cd, dataStructure = null, 
redeliveryCounter = 0, size = 1248, properties = 
{breadcrumbId=ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-500,
 CamelJmsDeliveryMode=2, taskType=processIndexTask}, readOnlyProperties = true, 
readOnlyBody = true, droppable = false, text = 
{"fiscalYear":2011,"indexCompression":"ZIP","..."quarter":2}}
2012-06-09 13:27:39,280 [Camel (camel-1) thread #34 - Threads] INFO  
PROCESS_INDICES_STATE.RESPONSE - Exchange[ExchangePattern:InOut, 
BodyType:String, 
Body:{"fiscalYear":2012,"indexCompression":"ZIP","indexType":"COMPANY","quarter":1}]
2012-06-09 13:28:15,364 [Camel (camel-1) thread #13 - 
PersistentQueueReplyManager[completionsQueue]-1] WARN  
org.apache.camel.component.jms.reply.PersistentQueueReplyManager - Reply 
received for unknown correlationID 
[ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-508]. The 
message will be ignored: ActiveMQTextMessage {commandId = 5, responseRequired = 
true, messageId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:6:1:1:1, 
originalDestination = null, originalTransactionId = null, producerId = 
ID:Vladimir-Tsvetkovs-MacBook-Pro.local-57252-1339232410422-1:6:1:1, 
destination = queue://completionsQueue, transactionId = null, expiration = 0, 
timestamp = 1339237695326, arrival = 0, brokerInTime = 1339237695327, 
brokerOutTime = 1339237695328, correlationId = 
ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-508, replyTo = 
queue://completionsQueue, persistent = true, type = null, priority = 4, groupID 
= null, groupSequence = 0, targetConsumerId = null, compressed = false, userID 
= null, content = null, marshalledProperties = 
org.apache.activemq.util.ByteSequence@bd53277, dataStructure = null, 
redeliveryCounter = 0, size = 1248, properties = 
{breadcrumbId=ID-Vladimir-Tsvetkovs-MacBook-Pro-local-57270-1339232420004-0-500,
 CamelJmsDeliveryMode=2, taskType=processIndexTask}, readOnlyProperties = true, 
readOnlyBody = true, droppable = false, text = 
{"fiscalYear":2011,"indexCompression":"ZIP","..."quarter":1}}
{code}

                
> Replies with Incorrect CorrelationIDs Received After Reinstantiating a Route 
> with ActiveMQ Endpoint and Exclusive Reply Queue
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5309
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5309
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.9.2
>         Environment: Java 1.6, ActiveMQ 5.6-SNAPSHOT (used in-memory within a 
> Spring application)
>            Reporter: Vladimir Tsvetkov
>            Assignee: Claus Ibsen
>             Fix For: 2.9.3, 2.10.0
>
>
> When I first instantiate the following route, it works as expected. The 
> Replies that come have the right correlation ids, just as Camel has assigned 
> them.
> {code}
> from("direct:fetchStateStart")
> .setExchangePattern(ExchangePattern.InOut)
> .to("activemq:queue:tasksQueue?replyTo=completionsQueue" +
>         "&replyToType=Exclusive" +
>         "&requestTimeout=" + FETCH_INDEX_TIMEOUT)
> .threads(10)
> .routeId("route-001");
> {code}
> When this route completes, it is stopped and removed from the camel context. 
> When a similar route is instantiated:
> {code}
> from("direct:processStateStart")
> .setExchangePattern(ExchangePattern.InOut)
> .to("activemq:queue:tasksQueue?replyTo=completionsQueue" +
>         "&replyToType=Exclusive" +
>         "&requestTimeout=" + PROCESS_INDEX_TIMEOUT)
> .threads(10)
> .routeId("route-002");
> {code}
> Half of the replies come as expected, while the other half results in the 
> following warning: *Reply received for unknown correlationID*.
> A workaround for this issues is to use a different *ReplyTo*-queue for each 
> new instantiation of a similar route.
> E.g. for the second route, it'll work if:
> {code}
> from("direct:processStateStart")
> .setExchangePattern(ExchangePattern.InOut)
> .to("activemq:queue:tasksQueue?replyTo=processedIndecesQueue" +
>         "&replyToType=Exclusive" +
>         "&requestTimeout=" + PROCESS_INDEX_TIMEOUT)
> .threads(10)
> .routeId("route-002");
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to