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 » MQclient

Post new topic  Reply to topic
 MQclient « View previous topic :: View next topic » 
Author Message
btdo
PostPosted: Tue Jun 28, 2005 12:07 pm    Post subject: MQclient Reply with quote

Novice

Joined: 03 Jun 2005
Posts: 19

I am writing a client application in VB.net that would send a message to the server and the server then would send a message back. For example, if I put a message in a Output queue as "TIME", I would receive a message from the input queue as "The time is now 15:45:57.80" . This part is working


A problem occurs when I have two clients running my application that are using the same input and output queues. For example, if client 1 put a message at 3:30 and client 2 put another message at 3:40 to the same Output queue. Then at 3:50 client 2 make a Get call to the input Queue, it receives the "The time is now 3:30" message which suppose to go to client 1 not client 2. And if client 1 make a get call, it receives the message "the time is now 3:40".

I guess my question is "is there a way to separate messages from different users ? ". I know there is message id and correlation id, but i am not sure how they work either, can someone explain them to me ?? or better yet, a sample code would help. Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jun 28, 2005 12:44 pm    Post subject: Re: MQclient Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

btdo wrote:
I guess my question is "is there a way to separate messages from different users ? ".

Yes. Use Message Id and Correlation Id in a standard, well documented, request/reply pattern.

btdo wrote:
I know there is message id and correlation id, but i am not sure how they work either, can someone explain them to me ?? or better yet, a sample code would help. Thanks


The Application Programming Guide has explicit information about Request/Reply patterns.

The MQ Sample Code has explicit examples of request/reply processing in multiple languages. Try the Samples directory on your MQ machine.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
btdo
PostPosted: Wed Jun 29, 2005 10:16 am    Post subject: MQClient session Reply with quote

Novice

Joined: 03 Jun 2005
Posts: 19

Hi
By using the message id and correlid, would I be required to write some code for user exit ?. Is there a way to get around this ?
Back to top
View user's profile Send private message
WillH
PostPosted: Wed Jun 29, 2005 11:08 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 23

No user exit required. You populate those fields in the MQMD message descriptor that you pass to the MQGET call.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jun 29, 2005 11:09 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

It's easy, you just save the msgid generated by the MQPUT and specify it on the MQGET as the correlid.

Providing the server application turns it around and sends the inbound message id on the reply messages as correlid.

If it doesn't then you have to have one reply queue per program (and get without specifying correlid)
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 API Support » MQclient
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.