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 » Getting A Message

Post new topic  Reply to topic
 Getting A Message « View previous topic :: View next topic » 
Author Message
Gopi
PostPosted: Thu May 23, 2002 6:12 pm    Post subject: Getting A Message Reply with quote

Novice

Joined: 23 May 2002
Posts: 18

Hi Can anybody help me out ...?????

I am newbie to this MQ Series, & trying to explore the features...
Here is my problem... Thanks inadvance.
I am having 2 questions.

Question 1:
Here my client application CA put one message(Request R1) on Queue Q1, Now the Server Application SA receives this message and process the message, prepares message(response, which contains some data) and put message on Q2. The client Application CA should receive this message for further processing to display to the end user. So how do my client application know this response on Q2 is reference to the request R1?
Bcoz there could be several messages on Q2, out of which how could my Client application identifies its response message from the Server Application on Q2? I guess there should be some way to identify.

Both Q1 & Q2 are owned by same QManager. ie, there is only one QManager, with 2 different Qs( Q1 & Q2).

Question2:
In the above scenario, CA should wait for the incoming requests as well as it should check the its appropriiate message arrived in the Q2 or not. so for this implementation should i consider signaling mechanism or multi threaded application?

Here what i am actually trying to do:

1) Client application will put a message on Q1. Waits for the response from Server Application (Looking on Q2)
2) Server Application Receives this message & process the message, and prepares a response message and finally put it on Q2.
3) Now Client application receives the message and display to the End user.

If i have to use either MsgId or CorrelId , to identify the message which was arrived on Q2, how can my CA know the MsgId & CorrelId while its putting the message on Q1? I mean these fields are generated by the QManager right at the runtime..? so how do my client application know abt this information?If my CA is aware of MsgId& CorrelId before it puts mes on Q1,then It can identify the message returned by the SA, coz it uses CorrelId.
Thanks,
Gopi
Back to top
View user's profile Send private message
Ward
PostPosted: Fri May 24, 2002 12:39 am    Post subject: Reply with quote

Voyager

Joined: 27 Jun 2001
Posts: 98
Location: Europe

Hiya,

Just a short answer but this should get you a bit further...

Yes, using MsgId/CorrelId is a good aproach (not the only one but easy and certainly applicable for what you're doing).

Your client program will set the MsgId (well MQSeries does it for you to make it unique). Your Server program should copy the MsgId it receives into the CorrelId of it's reply...

Since the MQMD is an input/output parameter your client program can check what the value is of the MsgId after putting the message to the queue.

Good luck,

Ward
_________________
IBM Certified Solution Designer -- WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
----------------------------
Visit Boat Dimensions
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oz1ccg
PostPosted: Fri May 24, 2002 2:16 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hi,

Remember to do a MQCMIT after the MQPUT in CA (if using MQPMO_SYNCPOINT, else you will never get the answer... Because the server don't get the request R1 before your application commits it.

When you do the MQGET in the CA, you're setteing CORRELID = MSGID from MQPUT. And in the server application always init MQMD before doing an MQGET.
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Gopi
PostPosted: Fri May 24, 2002 6:15 am    Post subject: Thanks Reply with quote

Novice

Joined: 23 May 2002
Posts: 18

Hi Guys,
Thanks for the information & your time. Now i have the idea. Thanks for your replies.
Gopi.
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 » Getting A Message
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.