This seems like it should be easy, but I cannot figure out how to obtain the
properties from a JMS TextMessage.  I can obtain the body of the message
with ConvertBodyTo() but I also need the properties.

I'm using an ActiveMQ (v5.5) TestMessage and setting the properties in a
different java app like, 

  TextMessage message = session.createTextMessage();
  message.setStringProperty("status1", status1);
  message.setStringProperty("status2", status2);
  message.setText(userMessage);
  .
  .

To read the Text message off the queue (with Camel 2.7.2) I have a route
like:
 
from("activemq:queue:myholdingqueue?testConnectionOnStartup=true").converBodyTo(String.class).to("stream:out");
  
This gives me the text of the message ("userMessage" above) but how do I get
the properties?

FYI, my end goal is to read those properties, verify the value (in a bean -
posibly changing the names of the properties) then storing the values into a
database.

Thanks for any insight.

J

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-use-JMS-TextMessage-Properties-tp4574811p4574811.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to