Hi, >From my understanding Request Reply (InOut) doesn't make too much sense in >combination with topics. With queues the semantic is simple: you send out a >message to a queue, wait for a response in a different queue and proceed. For >topics the thing is a bit different, if you send a message to a topic, this >is more an Event Message (InOnly) as there may be an arbitrary number of >consumers (0..n), so even if there were responses for these messages, Camel >had no way to determine what n is and how many answers to expect.
For your use case, I see two different approaches you could take: Either continue to use a topic (but with InOnly) and handle the responses in a different route (as you proposed in your mail) or use a multicast to send this to 10 queues (instead of a topic) with the InOut pattern and then aggregate the responses (Scatter-Gather EIP). Best regards Stephan -----Original Message----- From: PJ Walstroem [mailto:[email protected]] Sent: Donnerstag, 25. April 2013 07:35 To: [email protected] Subject: InOut and JMS topic, does it make sense? hello, we are using Camel 2.11.0 with the following route from("activemq:incoming").inOut("activemq:topic:integrations").to("direct:storage").end() my question is simply if this makes sense? We love the idea of using InOut MEP and letting Camel generate temporary reply-queues. We have e.g. 10 JMS Clients listening to the topic and all of them would like to send a reply, but seems like Camel only handles the _first_ reply with the given JmsCorrelationId, the following messages are just discarded and we get the following error: "Reply received for unknown correlationID [Camel-ID-local-finn-no-60071-1366820228380-0-8]. The message will be ignored" Should we use inOnly instead? We use InOut to be able to preserve the breadcrumb-id which we use for MDC logging (which Camel handles beautifully, btw), but I guess we could just set that breadcrumb-id manually in a postProcessor at the JMS Client side. any thoughts would be highly appreciated! regards, Per Jorgen -- View this message in context: http://camel.465427.n5.nabble.com/InOut-and-JMS-topic-does-it-make-sense-tp5731502.html Sent from the Camel - Users mailing list archive at Nabble.com.
