Posted: Wed Jun 29, 2011 2:31 pm Post subject: need .net sample on getting particular message from queue
Newbie
Joined: 29 Jun 2011 Posts: 2
Hi Guys,
I am using the .net api to connect to MQ 7. My requirements include browsing messages in a queue as well as going back and retrieving specific messages. From reading documentation it seems it should be possible using msgid and correlid or msgtoken. Can you please provide a sample c#/vb code on how to implement an mqget command to retrieve a specific message based on msgtoken or msgid? or if you can point me in the right direction. Thanks in advance for your help
Posted: Wed Jun 29, 2011 3:16 pm Post subject: Re: need .net sample on getting particular message from queu
Jedi
Joined: 09 Mar 2004 Posts: 2080
There are already .NET samples in your MQ installation. Eg. nmqsget.cs.
To get you started, look at changing the value of the MatchOptions property in your MQGetMessageOptions object. Also setting the value(s) in the MsgId and CorrelId properties of the MQMessage you supply to the MQQueue.Get() call.
Search the MQ Information Center for terms like "match", "correlid", and so on. You might get a page that is oriented towards C programmers, but the principles are the same in all languages.
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