|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
publish/subscribe - clearing subscriber queues |
« View previous topic :: View next topic » |
Author |
Message
|
gsaluja |
Posted: Tue Apr 04, 2006 10:40 am Post subject: publish/subscribe - clearing subscriber queues |
|
|
Novice
Joined: 06 Dec 2005 Posts: 21 Location: Houston
|
Hi,
Is it possible to have a publisher remove all messages from a subscribers queue before publishing messages to that subscriber? If so, how?
I have a publisher application that on startup broadcasts a high volume of messages to subscribers. If, for whatever reason, the publisher app fails and restarts it will again publish a high volume of messages to the subscribers. If the restart happens relatively soon after initial startup this will result in potentially twice as many messages being in the subscribers queue. At startup of the publisher app, I would like for it to first remove any messages in the subscribers queue before it publishes any messages.
I am using the C API, MQ ver5.3
Thank you for your replies. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 04, 2006 10:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The entire point of publish/subscribe is to isolate publishers from subscribers.
So, the answer is "No". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Tue Apr 04, 2006 11:43 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Why wouldn't the publisher check to see if a given message was already published and not republish it? Can't your publisher have some sort of checkpoint that's taken every "nn" messages to say "messages up to this point" have been already published. If you could co-ordinate the checkpoint and the publication messages within a UOW, you could totally avoid duplication...
of course, this all depends on exactly how your publisher decides what to publish.... just food for thought.... _________________ -wayne |
|
Back to top |
|
 |
mvic |
Posted: Tue Apr 04, 2006 12:18 pm Post subject: Re: publish/subscribe - clearing subscriber queues |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
gsaluja wrote: |
I would like for it to first remove any messages in the subscribers queue before it publishes any messages. |
This is a pretty anti-social thing for a publisher to do. As jeff points out, publishers are generally unaware of details of subscribers to its topic. Consider: how much processing would the publisher have to do if there were 1000 subscribers to the topic, each with 100 publications yet to consume... and how would it know the topology of the broker network so it could go and fetch the unconsumed messages. |
|
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
|
|
|
|