can i get a new message?

The .handle(notifyOnArrival) is just a Service Activator with all the state carrying from the request to reply. Only what we need is to ensure that we really provide that state. the best place to keep a state in the context of the message is to store the request message into headers and then restore it from there in the reply afterward or from the ErrorMessage.

headersToAdd.put("originalMesasge", new ExpressionEvaluatingHeaderValueMessageProcessor("#root", Message.class));

So, you add that originalMesasge from the request message and this one is going to be copying by the Service Activator logic into the reply message.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top