camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From efenderbosch <eric.fenderbo...@segmint.com>
Subject Re: Missing headers when using Stomp (request/reply)
Date Mon, 11 Aug 2014 18:38:45 GMT
It seems I'm seeing the same behavior with AMQP?

BrokerService brokerService = new BrokerService();
// We have to specify 'transport.transformer=raw' or we get an NPE due to
x-opt-jms-type being null
// See: https://issues.apache.org/jira/browse/PROTON-631
brokerService.addConnector("amqp://localhost:5672?transport.transformer=raw");
brokerService.start();

CamelContext camelContext = new DefaultCamelContext();
camelContext.addComponent("amqp",
AMQPComponent.amqpComponent("amqp://localhost:5672"));
camelContext.start();

camelContext.addRoutes(new RouteBuilder() {
    @Override
    public void configure() throws Exception {
        from("amqp:queue:request_queue").
        log("headers ${headers}").
        bean(new MyGenerator()).
        split(body(), new MyAggregationStrategy()).
        bean(new MyRunner()).
        end().
        log("headers ${headers}").
        // TODO send to JMSReplyTo, but it isn't populated
        to("amqp:queue:response_queue");
    }
});

// route to test above route
camelContext.addRoutes(new RouteBuilder() {
    @Override
    public void configure() throws Exception {
        from("amqp:queue:response_queue").log("${in.body}").log("headers
${headers}");
    }
});

// send test message
ProducerTemplate producer = camelContext.createProducerTemplate();
producer.sendBodyAndHeader("amqp:queue:request_queue", 1234L, "JMSReplyTo",
"blah");

The JMSReplyTo header isn't populated in any of the log statements.



--
View this message in context: http://camel.465427.n5.nabble.com/Missing-headers-when-using-Stomp-request-reply-tp5754917p5755060.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message