Dear Camel Experts
I have an object which becomes the main message to be transported
across camel routes. So, I don't use String or other simple object.
That's why I have to use converter.
@Converter
public class InternalMessageConverter {
@Converter
public static InputStream toText(InternalMessage iMsg) {
return new ByteArrayInputStream(iMsg.toString().getBytes());
}
}
The problem is at this route:
<route>
....
<wireTap uri="activemq:log.transaction" /><!-- Log the iMessage -->
<choice>
<when>
<simple>${in.header.nextDestination} != null</simple>
<wireTap uri="direct:invokeInBackground" />
</when>
</choice>
</route>
<route>
<from uri="direct:invokeInBackground" />
<to uri="bean:modifier?method=modify" />
<!-- Send to create reversal TX log -->
<wireTap uri="activemq:log.transaction" /><!-- Log the modified
iMessage -->
</route>
When I send a message, the log.transaction will have the same messages
which are both modified. I expect that I will have two different
messages inside log.transaction (the unmodified and the modified one).
Because the first wireTap sends the unmodified message to log but the
second one sends the modified message. How to achieve this?
Thanks
--
~The best men are men who benefit to others
http://michsan.web.id 一緒に勉強しましょう!
Yang berkualitas memang beda rasanya!
http://rizqi-cookies.com