Author |
Message
|
VijayGoparaju` |
Posted: Thu Sep 11, 2008 1:52 am Post subject: How to get a Particular Message from the Queue |
|
|
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 |
|
 |
Mr Butcher |
Posted: Thu Sep 11, 2008 2:02 am Post subject: |
|
|
 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 |
|
 |
VijayGoparaju` |
Posted: Thu Sep 11, 2008 2:28 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Thu Sep 11, 2008 2:41 am Post subject: |
|
|
 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 |
|
 |
bower5932 |
Posted: Thu Sep 11, 2008 6:09 am Post subject: |
|
|
 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 |
|
 |
VijayGoparaju` |
Posted: Thu Sep 11, 2008 8:20 pm Post subject: |
|
|
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 |
|
 |
bower5932 |
Posted: Fri Sep 12, 2008 5:45 am Post subject: |
|
|
 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 |
|
 |
bower5932 |
Posted: Fri Sep 12, 2008 5:46 am Post subject: |
|
|
 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 |
|
 |
VijayGoparaju` |
Posted: Mon Sep 15, 2008 2:56 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Mon Sep 15, 2008 3:21 am Post subject: |
|
|
 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 |
|
 |
VijayGoparaju` |
Posted: Mon Sep 15, 2008 3:35 am Post subject: |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
Thank You very much for your Replies...
Vijay...  |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Sep 15, 2008 6:12 am Post subject: |
|
|
 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 |
|
 |
VijayGoparaju` |
Posted: Tue Sep 16, 2008 7:42 pm Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Tue Sep 16, 2008 9:10 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
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 |
|
 |
VijayGoparaju` |
Posted: Tue Sep 16, 2008 9:17 pm Post subject: |
|
|
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 |
|
 |
|