activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject why can't messages be forwarded through the same broker more than once?
Date Mon, 13 Oct 2008 18:34:55 GMT
I'm using a network of brokers to consume messages and I'm seeing the
log message stating '... Ignoring sub ... already routed through this
broker once'. This is coming from the
DemandForwardingBridgeSupport.serviceRemoteConsumerAdvisory() method:

...
            if (contains(info.getBrokerPath(), localBrokerPath[0])) {
                // Ignore this consumer as it's a consumer we locally sent to
                // the broker.
                if (LOG.isDebugEnabled()) {
                    LOG.debug(configuration.getBrokerName() + "
Ignoring sub " + info + " already routed through this broker once");
                }
                return;
            }
...

My question is about why this is restricted in this manner? I can see
that we don't want message ping pong between brokers, but it seems it
should be finer grained than not allowed at all.

If I send 10 messages to brokerA, consume two messages from brokerB
and then a consumer hits brokerA, it won't be able to consume any
messages because they won't be forwarded back to brokerA because of
this rule. Maybe I'm overlooking a setting???

I'm also wondering why all messages are forwarded between brokers. If
a consumer becomes active on a broker in the network, all messages on
that queue are forwarded, regardless of whether they can be consumed
or not. This is what's causing messages to be stuck on brokerB in this
use case. Is there a workaround for this?

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

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message