-
1. Re: MDB and clustered Topics
timfox Jan 4, 2008 11:34 AM (in response to jduty)A Topic is JMS mechanism for publish-subscribe messaging.
This basically means that multiple subscribers can subscribe to a particular topic (e,g, a news feed), and _all_ the subscribers will receive messages posted to that topic.
JMS also supports what is known as point to point messaging using Queues. In this mode, a message is posted to a queue, and is only consumed by a single consumer.
An example of this would be an order processing queue, where you only want each order to be processed by one order processor.
Since you only want your message processed by one consumer, sounds like you want to use a queue rather than a topic.
If you use a non clustered topic, then all consumers on *that node* will receive all messages published to the topic.
If you use a clustered topic, then all consumers on *all nodes* will receive all messages published to the topic. -
2. Re: MDB and clustered Topics
jduty Jan 4, 2008 11:40 AM (in response to jduty)THanks for the quick reply Tim.
I guess a better description of what I'm using is a clustered durable subscription. In that case, would only one receive the message?
On another note I do need a topic because on each node I have multiple MDBs, all subscribing to different clustered durable subscriptions. -
3. Re: MDB and clustered Topics
timfox Jan 4, 2008 12:16 PM (in response to jduty)Ok I think I understand what you are doing now :)
JBM does support clustered durable subscriptions.
If you had multiple MDBs on different nodes of the cluster with the same client id and durable subscription name, then JBM will ensure that only one of them will get the message.
This allows you to spread processing of messages from a particular durable subscription across the cluster.
This is a nice feature of JBM you won't find in many other JMS providers. -
4. Re: MDB and clustered Topics
jduty Jan 4, 2008 12:19 PM (in response to jduty)Fantastic! Thank you Tim.
The great responses to posts is also something you won't find with other JMS providers ;) Thanks to the messaging team for great all around service!
+1 beer to all of you.
~Jonathan