Is there a way to put object in message in camel route process.
lets say i have a route
from("direct:send")
.process(queueProcessor)
.to(activemqEndPoint)
and in the queueProcessor i am putting an object in the exchange,
Now, I have a listener which listens to activemqEndPoint(queue)
public void onMessage(Message message) {
try {
//here i want to get the message i set it in the exchange
}
Any help?? THanks in advance
sure, Camel will put an ActiveMQObjectMessage in the queue and you can just cast the message back into your object type...
trying this worked for me