ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Get message from MQ queue

Post new topic  Reply to topic
 Get message from MQ queue « View previous topic :: View next topic » 
Author Message
PriyaJ
PostPosted: Tue Jul 04, 2017 8:27 pm    Post subject: Get message from MQ queue Reply with quote

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
View user's profile Send private message
PaulClarke
PostPosted: Tue Jul 04, 2017 8:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nageshr99
PostPosted: Tue Jul 04, 2017 9:45 pm    Post subject: Re: Get message from MQ queue Reply with quote

Novice

Joined: 30 May 2017
Posts: 24

PriyaJ wrote:
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


https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q026300_.htm
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 05, 2017 3:37 am    Post subject: Reply with quote

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
View user's profile Send private message
PriyaJ
PostPosted: Mon Jul 10, 2017 10:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 10, 2017 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message
PriyaJ
PostPosted: Mon Jul 10, 2017 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 10, 2017 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message
PriyaJ
PostPosted: Mon Jul 10, 2017 11:09 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 10, 2017 5:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20695
Location: LI,NY

And review the use of ALIAS queues...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Android 23
PostPosted: Wed Jul 12, 2017 10:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 13, 2017 3:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Get message from MQ queue
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.