|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help with pub/sub |
« View previous topic :: View next topic » |
Author |
Message
|
hrengifo |
Posted: Mon Feb 03, 2014 6:50 pm Post subject: Help with pub/sub |
|
|
Newbie
Joined: 03 Feb 2014 Posts: 2
|
hi everybody.
i have a technical question that i can not work out.
my solution have two components, the first one is a broker flow and the other one is a jee app.
1. my jee app publish a message on a MQ topic
2. when the broker flow are executed, reads (browse) the message on a queue that are listening the topic
3. broker flow modifies the message with some content of the queue read in the point 2
my issue is that i always need to read the last message published, without using message priority. it is like if the new publications overrides the old one. |
|
Back to top |
|
 |
exerk |
Posted: Tue Feb 04, 2014 12:51 am Post subject: Re: Help with pub/sub |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
hrengifo wrote: |
...my issue is that i always need to read the last message published, without using message priority. it is like if the new publications overrides the old one. |
That's generally how pub/sub works - who would want 'old' information? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
zpat |
Posted: Tue Feb 04, 2014 3:08 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Queues don't listen. They only hold messages.
Active and matching subscriptions are passed messages. If you define an administrative durable subscription with a destination of a queue, that queue will get all the messages sent.
You can read that queue until the last message on the queue which will be the last one published.
However the classic model of picking up just the last one published is called "retained publication". In this case the pub/sub engine keeps the most recent message available, so if someone then subscribes after the time it was published - they can still pick it up.
In this case the application dynamically subscribes whenever it wants to collect the last published message. No queues are necessarily used.
This requires the publisher to set the "retained publication" flag. However WMB nodes do not dynamically subscribe to publications (as far as I know). If you think about it - how would the flow know when to subscribe?
Usually WMB input nodes are active all the time, in which case you can use an administrative subscription to feed the flow via a queue. But the flow would get invoked for every message.
So you need to decide what criteria would cause you to look for the most recent publication. I.e. When is this needed? At intervals perhaps?
Read the pub/sub documentation for WMQ first, then see how (or if) the WMB broker can fit into that. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
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
|
|
|
|