how to access activemq jms custom header property; from camel route -
please see question first. how can access custom header property value "queue2"?outside of route builder method or class.
i using shown below. dont find methods in consumertemplate api custom header properties.
consumertemplate consumertemplate = camelcontext.createconsumertemplate(); textmessage = consumertemplate.receivebody("activemq:queue2",10000,string.class); that question set header using camel route. question how access custom header outside of class using queue name
you need receive exchange have data
consumertemplate consumertemplate = camelcontext.createconsumertemplate(); exchange exchange = consumertemplate.receive("activemq:queue2",10000); string data = exchange.getin().getbody(string.class); string ordernumber = exchange.getin().getheader("ordernumber", string.class);
Comments
Post a Comment