Some background - which may help.
Information about subscriptions are passed dynamically using advisory messages. Information about the current, active subscriptions are forwarded - to the remote broker - as are arrivals of new subscriptions and departures of old. By default information about Queues and durable subscribers (even if not active) are also forwarded. More info here: http://activemq.apache.org/networks-of-brokers.html Bit confused by filters - there are network filters - which filter out destinations on a network - but I think you mean selectors ? Selectors are part of the JMS spec and can be optionally applied to a MessageConsumer
Rest in-lined:
On 4 Jan 2010, at 20:42, user9876 wrote:


Hi could someone please explain at a relatively low level how the Network of Brokers works. I currently have quite a simple understanding that once a network is set up, a client can publish to any broker in the network and that message will be forwarded to any subscriptions present on any other
broker.  I also believe these subscriptions can have filters.
I know this is quite a broad question so the particular questions I have
are:

When a client subscribes to a topic on one broker, how are the other brokers in the network made aware of this new subscription and how do they store the
subscriptions and the individual filters (predicates)?
Subscriptions are dynamic - so information is cached in memory. However on re-start of a broker - it will query its message store for queues and durable subscribers - creating a proxy active subscriber for each. Filters are defined in the local configuration of the broker. Selectors on subscriptions are generally ignored.

Does each broker in the network hold replicated information of the
subscriptions present on the network?
Yes it does.

If two subscriptions exist on one broker with different filters, will a message be sent once only across the network? And generally how are the
messages routed?
The message will be sent once - and the selector applied locally



--
View this message in context: 
http://old.nabble.com/network-of-brokers-internals-tp27019011p27019011.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


cheers,

Rob

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/





Reply via email to