Skip to main content

developerWorks >  WebSphere  >  Forums  >  WebSphere MQ  >  developerWorks

How to generate response message for request message???    Point your RSS reader here for a feed of the latest messages in this thread


Tags for this thread: 

     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is not answered.

Permlink Replies: 4 - Pages: 1 - Last Post: Nov 5, 2009 7:51 PM Last Post By: Glenns_Screen
madhusudhanr

Posts: 1
Registered: Nov 04, 2009 04:27:03 AM
How to generate response message for request message???
Posted: Nov 04, 2009 04:30:46 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi all,
I am working on one application where i need to put REQUEST MESSAGE in REQUEST QUEUE, after that i need to generate response and put it into RESPONSE QUEUE. Please tell me what are the required settings that i need to do at MQ server side to generate response after receiving the every request message.
Note:-Both my request and response queues are having same queue manager.
thanks,
madhu
Akash Bharti

Posts: 126
Registered: Jul 15, 2007 03:08:08 AM
Re: How to generate response message for request message???
Posted: Nov 04, 2009 05:47:08 AM   in response to: madhusudhanr in response to: madhusudhanr's post
 
Click to report abuse...   Click to reply to this thread Reply
Generating the response is the work of your application, what MQ do is, it just delivers the message to the configured destination.

btw, here is a message flow in MQ :

Sender Application(say App1) => remote queues => transmission local queue => sender channel => Listener => receiver channel => local queue => receiver applicaiton(say app2)

Following objects are required for one-way communication (i.e. sending message) :

Sender Server(say Srv1) MQ objects required (obviously inside the QMGR) :
1) Remote queue definition (attributes : RNAME, RQMNAME)
2) Transmission local queue (attribute : USAGE(XMITQ))
3) Sender Channel (attributes : Reciever server IP and port number)

Reciever Server(Srv2) MQ required (obviously inside the QMGR) :
1) Listener (attributes : Port)
2) Reciever Channel
3) Local Queue

For response message i.e. from App2 to App1..... Srv2 will become sender server, while Svr1 will become receiver server. And just oposite set of MQ objects will be required on each MQ Server.

In case you have any further queries, please write back.

Thanks
Akash
Glenns_Screen

Posts: 407
Registered: Apr 17, 2006 11:58:20 PM
Re: How to generate response message for request message???
Posted: Nov 04, 2009 08:02:17 PM   in response to: Akash Bharti in response to: Akash Bharti's post
 
Click to report abuse...   Click to reply to this thread Reply
Akash, all this info about remote queues and channels is unecessary, as the original poster said the request and reply queues were on the same queue manager.

>sender channel => Listener => receiver channel
This is inaccurate. The Listener is not involved in message transmission, its only job is to start a Message Channel Agent when a new connection happens on its TCP port.

Message Channel Agent for Sender channel => TCP/IP network => Message Channel agent for Receiver channel
is a more accurate depiction.

HTH, Glenn.
Akash Bharti

Posts: 126
Registered: Jul 15, 2007 03:08:08 AM
Re: How to generate response message for request message???
Posted: Nov 05, 2009 04:04:01 AM   in response to: Glenns_Screen in response to: Glenns_Screen's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Glenns,

Thanks for correcting me. Sometimes, I am not a good reader.

Well, coming back to the main question :
Are you having two applications connecting to the same queue manager?? Wherein one application generates a request message and the other application reverts a response?

I mean, the request and response messages certainly must be created by two different applications?? right ?? and both are connected to the same QMGR ??

If that's the case, how about just putting a message in a local queue and then putting a response in another local queue and having right reader application read it from those local queues.

Correct me if I am wrong.

Thanks
Akash
Glenns_Screen

Posts: 407
Registered: Apr 17, 2006 11:58:20 PM
Re: How to generate response message for request message???
Posted: Nov 05, 2009 07:51:28 PM   in response to: Akash Bharti in response to: Akash Bharti's post
 
Click to report abuse...   Click to reply to this thread Reply
A request/response design also needs to consider message affinity. Typically a number or requesters will share a request queue and possibly the response queue too, so a requester needs to be able to wait for and get the correct response message. Usually this is done using match on CorrelationId.

HTH, Glenn
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums