activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <>
Subject Reply:Detecting if a message was routed between multiple brokers in an interceptor
Date Sun, 30 Dec 2012 12:22:35 GMT
What's your specified requirement in your case?It's uncommon to intercept the delivery of messages.
When a message is passed through a broker, the broker id of that broker will be saved in the
and you can obtain them via the getBrokerPath method of message.

At 2012-12-29 04:45:24,BocaJim <> wrote:
>Hello all,
>I have an interceptor that is monitoring the onSend() method, and I would
>like to know if the message is going to be delivered to a queue "locally" or
>if the message is going to be routed to another broker to be delivered to
>the client.  In our network, it looks like this: (C=client, B=broker)
>Each client is subscribed to a single and unique queue (ie consumer count
>for all queues is exactly 1.
>C1 (Q1) -> B1
>C2 (Q2) -> B1
>C3 (Q3) -> B2
>B1 <-> B2 via 2 network connectors
>C1 puts a message in Q2, then C2 receives the message, and it is dispatched
>locally by B1 without sending the message to B2...
>C1 puts a message in Q3, then C3 receives the message after B1 forwards the
>message to B2.
>The intercepted method that catches the publish from C1 to either Q2 or Q3
>is where I would like to know if delivering to Q2 or Q3 is "local" or
>"remote" to the broker its running on (both B1 and B2 are running the
>interceptor code).
>Is there any way to do this?
>View this message in context:
>Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message