java - Camel ProducerTemplate send to a JMS message property -


in camel project, need send message gateway (which receive jms message).

for gateway, besides message text, there other string properties using jmsmessage.getstringproperty("xxx");

in camel project, code below:

@produce(uri = "xxx") private producertemplate template;  @override public void sendtoqueue(string textmessage, map<string, string> properties) {     template.sendbody(textmessage); } 

i know if send string text message invoke sendbody method receive 1 argument. wondering how should sent properties using camel , on other side can receive properties jms textmessage string properties.

also what's meaning camel headers, it's map.

you can use

template.sendbodyandheaders(textmessage, properties); 

as jms properties mapped camel message headers. , hence why can use sendbodyandheaders method include jms properties.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -