|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Selectively sending a subscription to a subscriber. |
« View previous topic :: View next topic » |
Author |
Message
|
anilit99 |
Posted: Wed Jul 29, 2009 2:16 pm Post subject: Selectively sending a subscription to a subscriber. |
|
|
 Voyager
Joined: 28 May 2009 Posts: 75 Location: London, UK
|
This post may be can go to some other forum, but I am using java for the implementation, so I thought of posting here.
I have single topic and multiple subscribers (external). I usually publish messages to this topic which is for all the subscribers (like status updates). But once in a while, I am having a situation where I need to aim a particular subscriber alone. Yup I know I am violating a fundamental rule :
Quote: |
It is the existence of topics that allows the providers and consumers of information to be decoupled in publish/subscribe messaging by removing the need to include a specific destination in each message as is required in point-to-point messaging. |
But it is a bit critical for me. Is there a way to do this ? Its not exactly possible to hard code into the source, because of the possible increase in the subscribers.
Any ideas ?  _________________ "I almost care !" |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Jul 29, 2009 3:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Add a lower level qualifier to the topic string. Change the particular subscriber to use a wild card.
eg. publish normal messages to /stuff, publish special messages to /stuff/special
General subscribers subscribe to /stuff, the particlar subscriber subscribes to /stuff/#
This can be extended to multiple special subscribers. They subscribe by topic "content" qualifiers rather topic qualifiers that identify the subcriber instance itself. This meets the fundamental rule you mentioned. _________________ Glenn |
|
Back to top |
|
 |
anilit99 |
Posted: Thu Jul 30, 2009 1:03 am Post subject: |
|
|
 Voyager
Joined: 28 May 2009 Posts: 75 Location: London, UK
|
Quote: |
General subscribers subscribe to /stuff, the particlar subscriber subscribes to /stuff/# |
Thats the problem here, I dont have separation like that.
Sorry for being a bit unclear. But we have only one set of external subscribers. At times, because of some error on one particular subscriber we may want to send the publication once again to this subscriber alone.
As I said, the external subscribers can grow in number so its exactly not possible to hard tune about that subscriber in the source.
Ok, I am not sure whether I made myself clear. _________________ "I almost care !" |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Jul 30, 2009 3:55 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi anilit99,
anilit99 wrote: |
Quote: |
General subscribers subscribe to /stuff, the particlar subscriber subscribes to /stuff/# |
Thats the problem here, I dont have separation like that.
Sorry for being a bit unclear. But we have only one set of external subscribers. At times, because of some error on one particular subscriber we may want to send the publication once again to this subscriber alone.
As I said, the external subscribers can grow in number so its exactly not possible to hard tune about that subscriber in the source.
Ok, I am not sure whether I made myself clear. |
Read up on Retained Publication, maybe that'll fit your requirement....
Regards. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 30, 2009 4:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Add a request / reply service to your publication service. This way a specific subscriber can send a request message. He will be the only one receiving the reply...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
anilit99 |
Posted: Thu Jul 30, 2009 7:36 am Post subject: |
|
|
 Voyager
Joined: 28 May 2009 Posts: 75 Location: London, UK
|
hey cheers fjb_saper !
yeah thats exactly what I am looking for. That fits very well into my app. The code looks very clean now. _________________ "I almost care !" |
|
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
|
|
|
|