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

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -