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 API Support » How to get a Particular Message from the Queue

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 How to get a Particular Message from the Queue « View previous topic :: View next topic » 
Author Message
VijayGoparaju`
PostPosted: Thu Sep 11, 2008 1:52 am    Post subject: How to get a Particular Message from the Queue Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

Hello,

I am trying to get a particular message from a Queue.The Queue is opened in BROWSE Mode.I want to retrieve a particular message from the Queue.
I have to set these? How to set these values in order to get a particular message?

queueMessage.CorrelationId;
queueMessage.MessageId;
queueMessage.MessageSequenceNumber;

(OR) Any method is there?

I am doing it in .NET.
Please Help,
Vijay...
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Sep 11, 2008 2:02 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

have you read the manuals?
have you had a look at the samples?
what have you tried so far?

gosh, this story continues ?!? i hoped it was done when you finally made your browse working
_________________
Regards, Butcher
Back to top
View user's profile Send private message
VijayGoparaju`
PostPosted: Thu Sep 11, 2008 2:28 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

I got all the remaining things but how to move the Cursor location to the required message I am not getting...Please tell..
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Sep 11, 2008 2:41 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

i do not see a good balance between what you try yourself to solve the problem, and the amount of help you are trying to get from this forum.

at least i quit "support" at this point because i do not see a real effort from your end trying to solve the problem before asking here.

If you really had read the manuals and had a look at the samples, then your questions would sound different.

just my 2 cents, dont want to offend you, others may still help.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Sep 11, 2008 6:09 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Try looking at the amqsecha.c sample. It manipulates the message id and correlation id.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
VijayGoparaju`
PostPosted: Thu Sep 11, 2008 8:20 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

I want to get the Next Message,Next Message while I click Next Message button fot that I have got the Message id and Corelated Id. How to Increment them both?
I have opened the Queue in BROWSE Mode.
This is what I Did:
int mid=MQC.MQRO_PASS_MSG_ID;
int cid=MQC.MQRO_PASS_CORREL_ID;
mid++;cid++;
queueGetMessageOptions.Options = MQC.MQGMO_BROWSE_NEXT;
queue.Get(queueMessage, queueGetMessageOptions);
txtGetData.Text=queueMessage.ReadString(queueMessage.MessageLength);

But it is not Going to the Next message.
Please Help,
Thanks,
Vijay...
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Sep 12, 2008 5:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If all you want to do is get the next message, then you don't need to do anything with the message id and correlation id other than set them to none. The "default behavior" of WMQ is to get the next message.

I'd suggest (again and as have others) that you take a look at the samples. amqsget0.c is the sample that gets messages.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bower5932
PostPosted: Fri Sep 12, 2008 5:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You might also want to look at the application programming guide and reference where they discuss the id's. They are not fields that you 'increment' to get the next one. They are based on several things (one of them being timestamp).
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 2:56 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

I will be pressing the Button 'NEXT', and click one more time NEXT and one more time NEXT so the messages have to be displayed one by one in the TextBox, Each one at a time.So please tell me.This is my requirement.

Thanks in Advance,
Vijay....
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Mon Sep 15, 2008 3:21 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

yes. just press next and you get the next message. this is exactly how MQ works. Every time you press next something is incremented so you get the next message. for details, please check the MQ documentation.

i am just curious. do you make your living from this? who gives you this requirements? or is this just homework? what is your profession? have you ever considered looking at samples or the documentation? what do you think these forums are for?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
VijayGoparaju`
PostPosted: Mon Sep 15, 2008 3:35 am    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

Thank You very much for your Replies...

Vijay...
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 15, 2008 6:12 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Your posts demonstrate to me that you need some basic WMQ training. I'd suggest taking an MQ application programming course. IBM offers a variety of 3-day, hands-on lab exercise courses.

Visit www.ibm.com/training. Enter the course code from the list below.

MQ052 WMQ Application Programming (UNIX)
MQ054 WMQ Application Programming (z/OS)
MQ057 WMQ Application Programming (Windows)

MQ096: WebSphere MQ Application Programming Using Base Classes for Java

MQ140: WebSphere MQ Programming Using the JMS
_________________
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
View user's profile Send private message
VijayGoparaju`
PostPosted: Tue Sep 16, 2008 7:42 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

First time when we click NEXT Button I am getting the first message then when I click NEXT I am not getting the Next messages.It is staying at the first message.
How to get next ones?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Sep 16, 2008 9:10 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
click NEXT Button

What method (code) is executed when you click NEXT?
_________________
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
View user's profile Send private message
VijayGoparaju`
PostPosted: Tue Sep 16, 2008 9:17 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Aug 2008
Posts: 72

I have opened the Queue like this:

queue = queueManager.AccessQueue( txtQueueName.Text, MQC.MQOO_BROWSE | MQC.MQOO_FAIL_IF_QUIESCING );

queueMessage = new MQMessage();
queueMessage.Format = MQC.MQFMT_STRING;
queueGetMessageOptions = new MQGetMessageOptions();
queueGetMessageOptions.Options = MQC.MQGMO_BROWSE_NEXT;
queue.Get(queueMessage, queueGetMessageOptions);
txtQueueMessage.Text=queueMessage.ReadString(queueMessage.MessageLength);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » IBM MQ API Support » How to get a Particular Message from the 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.