Author |
Message
|
Zack |
Posted: Sat Oct 06, 2018 6:57 am Post subject: Multi consumers |
|
|
Newbie
Joined: 06 Oct 2018 Posts: 4
|
Hi folks,
We need to create applications consuming the same message. Currently the first one reads the message is no longer available for the others. I read documentation about the browse and mark but my issue to remove the message once all applications have been read the message.
Thanks for your inputs,
Zack |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Oct 06, 2018 10:46 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
The normal behavior of an MQGET is to destructively consume the message. Your app(s) can request BROWSE, which will not destructively consume.
How will a consumer know that it is the last consumer? The last consumer should destructively consume the message.
This design might make use of a DB table where each consumer posts that it has “read” a msg (by its MsgId or similar). _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
tczielke |
Posted: Sat Oct 06, 2018 12:34 pm Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
This requirement sounds like something that is met with standard pub/sub. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
PaulClarke |
Posted: Sat Oct 06, 2018 12:44 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Indeed, with Pub/Sub MQ will send a different copy of the same message to each consumer that is 'interested' in messages of this type. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Oct 07, 2018 2:59 pm Post subject: Re: Multi consumers |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Zack wrote: |
Hi folks,
We need to create applications consuming the same message. Currently the first one reads the message is no longer available for the others. |
Hi Zack.
Multiple applications should never read from the same queue, unless they don't care who actually processes each msg.
Either go the pub/sub route (as suggested), or modify the producer app to put the same message to multiple queues, or add a 'distributor' app in between (creates another point of failure ).
What type of data is in the message? What are the processing requirements? There might be better solutions. _________________ Glenn |
|
Back to top |
|
 |
Zack |
Posted: Mon Oct 08, 2018 4:16 pm Post subject: Multi consumers |
|
|
Newbie
Joined: 06 Oct 2018 Posts: 4
|
Thanks guys for input.
Actually initially the design was made for only one consumer, now business needs other applications (for data warehouse) are interested to consume the message.
As you suggested may I have to change to pub/sub model.
Zack |
|
Back to top |
|
 |
|