camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <>
Subject Re: JMS message with Inout pattern
Date Fri, 09 Sep 2016 15:54:55 GMT
Sorry - you’re right.  I was basing my answer on when I was writing the “consumer side”
in pure Java.  I had to send a response in that case since Spring/Camel wasn’t around to
help with the details.

I put together a quick test of those routes, and it passes on Camel 2.10.7 - so I’m not
sure why you are seeing what you’re seeing.  I’ve pasted the test code below so you can
try it an see if it works.

Hope that helps

public class JmsRequestResponseTest extends CamelTestSupport {
    static final String TRIGGER_URI = "direct://trigger";

    public EmbeddedActiveMQBroker broker = new EmbeddedActiveMQBroker();

    @EndpointInject(uri = "mock://complete")
    MockEndpoint complete;

    protected JndiRegistry createRegistry() throws Exception {
        JndiRegistry registry = super.createRegistry();

        JmsComponent source = new JmsComponent();
        source.setConnectionFactory(new ActiveMQConnectionFactory(broker.getVmURL()));
        registry.bind("source", source);

        return registry;

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                        .setHeader("JMSExpiration", constant(System.currentTimeMillis() +
                        .log("Sending request")
                        .to(ExchangePattern.InOut, "source://entityQueue?disableTimeToLive=true&requestTimeout=4000&replyTo=outputq")
                        .log("Reply received")

                        .log("Received Request")
                        .log("Sending Reply")

    public void testRoute() throws Exception {

        template.sendBody("direct://trigger", "Request");

        assertMockEndpointsSatisfied(5, TimeUnit.SECONDS);

> On Sep 8, 2016, at 1:52 PM, Venu_s <> wrote:
> From my study of literature, as long as there is a JMSReplyTo set in the
> header of the JMS message, there is nothing special that needs to be done on
> the subscribe side. and also the mssage is making back to the output, just
> that the producer sent the message after it timed out.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message