On 8/2/06, bruce76 <[EMAIL PROTECTED]> wrote:


Hi,

We're planning on creating a display that shows all the messages flowing
in
and out of the NMR (I realize that this is a continuation of the "Get all
messages off the NMR thread")

http://www.nabble.com/Capture-any-message-off-the-NMR--tf1902644.html

However, we want to explore the path of using either the JDBCAuditor or
the
JBIContainer objects. So, here's my questions:

1. If I use the JBIContainter.addListener(listener), should I get a
callback
on every MessageExchange flowing through the NMR?


Yes.  Every time  a JBI exchange is sent by a component using
DeliveryChannel.send or DeliveryChannel.sendSync, the listener
is called with the given exchange.

2. If so, then is it possible to obtain the "sender" of the message? I
realize that I can determine the recipient of message from using either
MessageExchange.getEndpoint()  or  MessageExchange.getService()


Sure.
You should find the code in one of the existing listeners at
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/view/
Somehting like
  ((MessageExchangeImpl) exchange).getSourceId()
will return an identifier of the component that sent the exchange.

Thanks,

Bruce
--
View this message in context:
http://www.nabble.com/Questions-about-JDBCAuditor-and-JBIContainer-tf2040547.html#a5616242
Sent from the ServiceMix - User forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to