Author |
Message
|
iib.dev |
Posted: Mon Nov 13, 2017 10:46 pm Post subject: Get all matching messages from the Queue |
|
|
Newbie
Joined: 18 Sep 2016 Posts: 7
|
Hi All,
I would like to check is there any way we can get messages from Queue that matches lets say correlation id ?
I have a requirement to send the status of number responses received (at given time in separate call ) that send as part of batch message over MQ (lets say 100 items) and the provider will respond to each item in the separate message to a queue .
Any design suggestions are most welcome |
|
Back to top |
|
 |
zpat |
Posted: Mon Nov 13, 2017 11:52 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Reading the MQ documentation would be my recommendation.
MQMO_MATCH_CORREL_ID
In terms of message broker - this can be used with the MQinput or MQget nodes if the correct options are set.
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q026300_.htm
Normally a correlid would be unique, so I am confused about your requirement to get all matching messages from the queue.
Make sure to reset the match fields each time.
If you are browsing rather then getting destructively then you need to learn all about browse cursors and so on. _________________ 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 |
|
 |
iib.dev |
Posted: Tue Nov 14, 2017 2:58 pm Post subject: |
|
|
Newbie
Joined: 18 Sep 2016 Posts: 7
|
Thank you very much for your response .
Yes ..i understand we can use MQGet node to get a particular message with correlation ID. But asking just asking is there any way to get all the messages at once with given correlation id ,rather then looping as in my requirement response messages have same correlation id for batch request message(which contains several items ) |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 14, 2017 5:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
iib.dev wrote: |
Thank you very much for your response .
Yes ..i understand we can use MQGet node to get a particular message with correlation ID. But asking just asking is there any way to get all the messages at once with given correlation id ,rather then looping as in my requirement response messages have same correlation id for batch request message(which contains several items ) |
No, it ain't that easy. You have to get creative and remember that you cannot loop the wiring of the nodes...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
zpat |
Posted: Tue Nov 14, 2017 11:50 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If you want to group a number of messages together, then you should be putting them and getting them using the GROUPID feature.
Looping the MQGET node is possible in a compute node ESQL loop using propagate statements.
(A wiring loop would risk exhausting the stack.) _________________ 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 |
|
 |
|