You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Bruce Snyder <br...@gmail.com> on 2009/10/28 19:02:32 UTC

Re: Why can't a message be routed to a broker that has seen it before?

On Wed, Oct 28, 2009 at 12:52 PM, Elliot Barlas <el...@gmail.com> wrote:
>
> It seems that AMQ has a hard constraint that a message cannot be routed to a
> broker that has seen it before.
>
> NetworkBridgeFilter.java
>
>        if (contains(message.getBrokerPath(), networkBrokerId)) {
>            if (LOG.isTraceEnabled()) {
>                LOG.trace("Message all ready routed once through this broker
> - ignoring: " + message);
>            }
>            return false;
>        }
>
> Has anyone found a way to circumvent this constraint?  Is this constraint
> ever going to change?

This was implemented two or three years ago to prevent messages from
ping-ponging back and forth between brokers in a network. There is
already an open issue for this that I will be working on soon:

https://issues.apache.org/activemq/browse/AMQ-2324

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Why can't a message be routed to a broker that has seen it before?

Posted by Elliot Barlas <el...@gmail.com>.
The network ttl will prevent the continuous bouncing, so I am not concerned
about that.  I will keep my eye out for duplicates.


bsnyder wrote:
> 
> On Wed, Oct 28, 2009 at 4:28 PM, Elliot Barlas <el...@gmail.com>
> wrote:
>>
>> I commented out the NetworkBridgeFilter.java if statement mentioned in my
>> original post and it seems to be working as expected.  Do you know of any
>> harmful side affects this may cause?
> 
> Well, there's potential for messages to just constantly bounce back
> and forth around the network of brokers. Depending on how many wind up
> doing this it could cause a lot of unnecessary traffic. I'm also not
> sure if duplicate deliveries could occur.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-can%27t-a-message-be-routed-to-a-broker-that-has-seen-it-before--tp26098188p26102838.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Why can't a message be routed to a broker that has seen it before?

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, Oct 28, 2009 at 4:28 PM, Elliot Barlas <el...@gmail.com> wrote:
>
> I commented out the NetworkBridgeFilter.java if statement mentioned in my
> original post and it seems to be working as expected.  Do you know of any
> harmful side affects this may cause?

Well, there's potential for messages to just constantly bounce back
and forth around the network of brokers. Depending on how many wind up
doing this it could cause a lot of unnecessary traffic. I'm also not
sure if duplicate deliveries could occur.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Why can't a message be routed to a broker that has seen it before?

Posted by Elliot Barlas <el...@gmail.com>.
I commented out the NetworkBridgeFilter.java if statement mentioned in my
original post and it seems to be working as expected.  Do you know of any
harmful side affects this may cause?



bsnyder wrote:
> 
> On Wed, Oct 28, 2009 at 12:52 PM, Elliot Barlas <el...@gmail.com>
> wrote:
>>
>> It seems that AMQ has a hard constraint that a message cannot be routed
>> to a
>> broker that has seen it before.
>>
>> NetworkBridgeFilter.java
>>
>>        if (contains(message.getBrokerPath(), networkBrokerId)) {
>>            if (LOG.isTraceEnabled()) {
>>                LOG.trace("Message all ready routed once through this
>> broker
>> - ignoring: " + message);
>>            }
>>            return false;
>>        }
>>
>> Has anyone found a way to circumvent this constraint?  Is this constraint
>> ever going to change?
> 
> This was implemented two or three years ago to prevent messages from
> ping-ponging back and forth between brokers in a network. There is
> already an open issue for this that I will be working on soon:
> 
> https://issues.apache.org/activemq/browse/AMQ-2324
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-can%27t-a-message-be-routed-to-a-broker-that-has-seen-it-before--tp26098188p26101576.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.