1
votes

I am attempting to create a camel route using blueprint that sends a message on an activeMQ queue then listens to the response on the temporary queue created in the request. This seems pretty basic, but I can't find an example that utilizes it.

I have tried searching and reading the docs and here's what I've found: http://camel.apache.org/jms.html http://camel.apache.org/exchange-pattern.html http://camel.apache.org/request-reply.html https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/EIP_Transaction_Guide/files/FMRTxnJMSSynchronous.html http://kosalads.blogspot.com/2014/04/ApacheCamelRequestReplyPatternWithJavaDS.html http://grokbase.com/t/camel/users/128n88xeva/how-to-use-request-reply-in-jms http://camel.465427.n5.nabble.com/ExchangePattern-InOut-I-Can-t-get-any-response-td5056301.html https://examples.javacodegeeks.com/enterprise-java/apache-camel/apache-camel-exchange-example/

Which is frustrating.

I have my activeMQ component set up such:

<to pattern="InOut" uri="activemq:queue:tripRequest.updateStatus.v1.0?useMessageIDAsCorrelationID=true"/>
<log message="Update Status responded ${out.body}"/>

The log shows the input XML, which surprised me. After checking the docs, I created a new activeMQ instance that listens to the same queue and dumps to a log, but this threw errors and it keeps mixing up my log and unmarshal objects on my other route.

How can I accomplish this?

1
what do you mean listens to the response? Do you mean a proper request/reply so activemq creates a temporary respponse queue? Or do you mean async request/reply? Also, it is hard to see from your question what has gone wrong. Better if you share your route and what you expect and what you actually see.Souciance Eqdam Rashti
@SoucianceEqdamRashti I shared the only part of the route that I feel is useful for the question. The problem is that I don't know how to build the next piece. My route simply ends with an activeMQ call. I want to use a temporary response queue to process the reply. I will update the question.Thom

1 Answers

0
votes

Check the answer in the link below. It should give you hints on how to build your active-mq uri for a request/reply scenario.

Implement Request-Reply pattern using ActiveMQ, Camel and Spring