jms - IBM WebSphere MQ request/reply scenario -


I am currently working on a project where I need to interface with the IBM system, which is available in WebSphere MQ Communicates with the outside world through medium. . I need to query the system in "request-response" fashion using Qi, and I'm doing this through a queue manager

However, how do I practice it practically? I can not see enough about my head

Say I have found many examples of the same application that keeps a message on request. On leaving the application, the message gets correlation ID and MessageId , and to ensure that every Qi Manager knows that ReplyToQueue Assets are set on which queue to respond.

However, how does the Qi manager handle the response queue? There is no guarantee in relation to the timing of responses, so how does it come back to the application frequency of the correct answer, which issued this request?

I'm thinking of messages queue as FIFA queue messages should be chosen one by one, though, it would mean that example A can choose a response for example. Obviously, it can not be that how it works.

Then, when I get the API ( com.ibm.mq.MQQueue ), I think that to get a message, I want to type the correlation ID And there is a chance to provide MessageId . Does this mean that when I ask the queue manager for a message (with this id set), the queue manager repeats through the message in the queue and returns the mail message back? On the other hand, would it mean that we are not talking about the FIFA line?

This is normal practice to use CorrelationId to address requests and response messages. It works like this:

1) Suppose two rows, one REQQ - is the request queue where messages are sent to another application, service application, pick up and answer service process to the process and RESPC. .

2) The requester application (let's call it RAKPP) puts a request message (RECMGG) to request QE (REQQ). Before sending the message, REPAPP has set up the answerable property for the RESPQ on the message. When the request message is sent, the JM provider updates the message sent with a specific message ID. The requester application caches this unique message ID for later use. 3) On the other side of the weld, service application retrieves REQMSG from REQQ, reads MessageId and ReplyToQ property from that message, processes the request and prepares the appropriate response message RESPMSG, followed by RESPMSG CorrelationId sets MessageId to read properties from RECMSG and answers the answer to the texts.

4) The answering requester application, uses the cash message ID and sets the criteria below to read the reply message

  Receive messages from RESPQ RESPMSG.CORRELATIONID == REQMSG.MESSAGEID  

This selection criterion ensures that the correct response message has been retrieved. The key service application here must set CorrelationId on the response message to MessageId of the request message.

Although Qatar is FIFO type, MQ provides message delivery based on priority implementation, where high priority messages are given first or FIFA base where the message at the top of the queue has been given earlier.

Hope this is helpful


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -