views:

105

answers:

0

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.

I followed 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.

Thoughts? Suggestions?

Thanks, Chet