|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MDB in cluster environment |
« View previous topic :: View next topic » |
Author |
Message
|
cots |
Posted: Tue Sep 23, 2003 11:33 am Post subject: MDB in cluster environment |
|
|
Centurion
Joined: 16 Jun 2003 Posts: 105
|
Hi all,
I read one of the PowerPoint presatation from IBM regarding considerations for MDB but I don't quite understand, here is what they said
"if you use topics, each message will get processed several times in the cluster (at least once per container bound to that topic), use queues if you don't want this behavior"
could someone pls make it more clear and gives some samples.
Thanks in advance |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 23, 2003 11:54 am Post subject: Re: MDB in cluster environment |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
vaNewbie wrote: |
Hi all,
I read one of the PowerPoint presatation from IBM regarding considerations for MDB but I don't quite understand, here is what they said
"if you use topics, each message will get processed several times in the cluster (at least once per container bound to that topic), use queues if you don't want this behavior"
could someone pls make it more clear and gives some samples.
Thanks in advance |
The basic fact/the whole point of pub/sub is that one message gets published to many subscribers. Each subscriber gets a copy of the messsage.
So if you set up an MDB for a topic, rather than just for a queue, then each instance of the MDB will get a copy of the message because each instance of the MDB is registered as a unique subscriber.
If you set up an MDB for a queue, then you are not using pub/sub messaging. You're using point-to-point. Each message will go to exactly one queue, and only one instance of an MDB will get that message.
As an example, suppose I wanted to notify any interested application of a database change. I could set up a database trigger that would publish the new value to a topic. Then any application that needed to know about that change could subscribe to the topic, and every subscriber would get notified.
On the other hand, I wouldn't want to use pub/sub to request a database update. If I did, any number of applications would try to make the same update to my table, and cause contention or worse. There I would set up a point-to-point flow, and create a server app that would perform the update. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|