Author |
Message
|
PriyaJ |
Posted: Tue Jul 04, 2017 8:27 pm Post subject: Get message from MQ queue |
|
|
Novice
Joined: 29 Jun 2017 Posts: 21
|
Hi All,
Is it possible to get only one message from the MQ queue without disabling the 'GET' property of the queue.
I remember I used some small script to get the message when the request was triggered in to the queue, long back but not able to recall right now.
Could some one suggest something here please?
Regards
Priya |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Jul 04, 2017 8:47 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I think you are going to have to be a little more specific about what you want. When an application issues an MQGET call it is only given one message. In order to get multiple messages it has to go round in a loop.
Are you trying to process the messages singly or are you just trying to delete one particular message off a queue ? _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
nageshr99 |
Posted: Tue Jul 04, 2017 9:45 pm Post subject: Re: Get message from MQ queue |
|
|
Novice
Joined: 30 May 2017 Posts: 24
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 05, 2017 3:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If the GET property of the queue is disabled, how would you get any message at all? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
PriyaJ |
Posted: Mon Jul 10, 2017 10:25 am Post subject: |
|
|
Novice
Joined: 29 Jun 2017 Posts: 21
|
mqjeff wrote: |
If the GET property of the queue is disabled, how would you get any message at all? |
Hi,
If I disable the get property of the queue, then the messages will not be picked up from the queue and only will be put into the queue. So in that way I will be able to view the messages present in the queue.
But I want to view the messages without disabling the get property.
Regards
Priya |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 10, 2017 10:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PriyaJ wrote: |
But I want to view the messages without disabling the get property. |
How will that work? How do you expect to be able to see the messages before what is legitimately reading the messages reads them off?
Because under normal circumstances, you can just browse the queue with any of the available tools to see what's on it. It's just that on a working queue, the messages tend to disappear quite quickly..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PriyaJ |
Posted: Mon Jul 10, 2017 10:44 am Post subject: |
|
|
Novice
Joined: 29 Jun 2017 Posts: 21
|
Vitor wrote: |
PriyaJ wrote: |
But I want to view the messages without disabling the get property. |
How will that work? How do you expect to be able to see the messages before what is legitimately reading the messages reads them off?
Because under normal circumstances, you can just browse the queue with any of the available tools to see what's on it. It's just that on a working queue, the messages tend to disappear quite quickly..... |
I think I have phrased my question incorrectly.
I want to browse the messages so for that I need the messages to be in queue as mentioned that it gets quickly picked up. So to make the messages be in queue to be able to browse them I need to disable the GET property.
So, I don wan to do this and want to be able to browse the messages. Is it possible?
Regards
Priya |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 10, 2017 11:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PriyaJ wrote: |
want to browse the messages so for that I need the messages to be in queue as mentioned that it gets quickly picked up. So to make the messages be in queue to be able to browse them I need to disable the GET property.
So, I don wan to do this and want to be able to browse the messages. Is it possible? |
You're asking if it's possible to browse a message in a queue even though another application has destructively read the message off?
Unsurprisingly no. You need to stop the message being read off, either by asking the application to stop reading the messages or making them stop by get(disabling) the queue.
If you need to know what messages are passing through the queue, then there are any number of ways of auditing the queue; the best way is by asking the reading application to log what they're seeing. More complex MQ level audit solutions are possible, and a search of this forum will turn up discussions on this subject.
But none of them are one-button, automagic solutions. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PriyaJ |
Posted: Mon Jul 10, 2017 11:09 am Post subject: |
|
|
Novice
Joined: 29 Jun 2017 Posts: 21
|
Vitor wrote: |
PriyaJ wrote: |
want to browse the messages so for that I need the messages to be in queue as mentioned that it gets quickly picked up. So to make the messages be in queue to be able to browse them I need to disable the GET property.
So, I don wan to do this and want to be able to browse the messages. Is it possible? |
You're asking if it's possible to browse a message in a queue even though another application has destructively read the message off?
Unsurprisingly no. You need to stop the message being read off, either by asking the application to stop reading the messages or making them stop by get(disabling) the queue.
If you need to know what messages are passing through the queue, then there are any number of ways of auditing the queue; the best way is by asking the reading application to log what they're seeing. More complex MQ level audit solutions are possible, and a search of this forum will turn up discussions on this subject.
But none of them are one-button, automagic solutions. |
Thank you  |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 10, 2017 5:36 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And review the use of ALIAS queues...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Android 23 |
Posted: Wed Jul 12, 2017 10:49 pm Post subject: |
|
|
Apprentice
Joined: 27 Mar 2017 Posts: 38
|
Quote: |
Is it possible to get only one message from the MQ queue without disabling the 'GET' property of the queue. |
To retrieve only one message from the queue.
Try to use RFHutil tool to retreive message one by one
Hoping you it will help you
Thanks & Regards
Android23 |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jul 13, 2017 3:55 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Android 23 wrote: |
Quote: |
Is it possible to get only one message from the MQ queue without disabling the 'GET' property of the queue. |
To retrieve only one message from the queue.
Try to use RFHutil tool to retreive message one by one
Hoping you it will help you
Thanks & Regards
Android23 |
This is a good idea. Unless the message has been read by something else and isn't on the queue any more. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|