cbanner wrote:
I am trying to use the ActiveMQ and Camel (running in broker) on .NET using
Spring and NMS. In general, these components work brilliantly. I have a
camel route for send/receive, and some code in .NET to handle this - works
like a charm.
The issue I am trying to resolve is for a request-reply integration pattern.
Camel support this, and I have this route in my config:
<route>
<from uri="activemq:foo"/>
<to uri="activemq:bar" pattern="InOut"/>
</route>
In theory, Camel is supposed to set the NMSReplyTo and CorrelationID in such
a route so the reply knows where to go back to.
Camel just set the CorrelationId and ReplyTo header for reply message,
I don't if the NMS translate the ReplyTo to NMSReplyTo and you may need
to access the ReplyTo header in your .net code to verify it.
I followed
http://remark.wordpress.com/articles/implementing-request-response-with-activemq-and-nms/
this VERY helpful article to understand how to wire things together in
.NET. In the article, the code explicitly sets the location of the reply,
since it is not using Camel.
My question is how do I take advantage of the Camel route, so I don't have
to essentially duplicate it in code (which would defeat the purpose of a
config based integration pattern). I tried removing the NMSReplyTo and
CorrelationID in my code, but the reply never gets back to the sender. It's
almost like the Camel route is not 'internalized' by the application.
As your .net code is out of control of Camel, I'm afraid you have to do
the job (send the response message back) yourself.
Thoughts? Suggestions?
Thanks, Chet
Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang