IBM WebSphere MQ request/reply scenario

后端 未结 2 1051
粉色の甜心
粉色の甜心 2020-12-05 20:39

I\'m currently working on a project where I need to interface with an IBM system which communicates with the outside world through WebSphere MQ. I need to query the system i

2条回答
  •  半阙折子戏
    2020-12-05 21:08

    Shashi's answer is spot on for many situations, and is in fact the primary method of distributing responses amongst multiple, relatively low volume requesting applications.

    A better choice for high-volume services would involve multiple RESPQs. You can provide a separate RESPQ for each instance of REQApp by using Temporary Dynamic Queues to receive the RESPMsgs -- each instance of REQApp would create the TDQ using the MQOPEN function, and specify the RESPQ name in the ReplyToQ attribute of every message it sends out.

    With this setup you would not have to worry about sequencing and correlation IDs, as the messages will be returned to the individual RespQs in the same order in which they are processed by the service application.

    Of important note here is that TDQs are just that - temporary. When the OPENing application closes the queue - either via MQCLOSE or by terminating - any messages in the TDQ are lost and not recoverable. If this is a issue - that all responses must be processed no matter what - then you would want to one-time allocate a series of permanent dynamic queues (also using MQOPEN), one for each instance of REQApp, and each instance of REQApp must reconnect to that same queue each time.

    I hope this helps as well.

提交回复
热议问题