且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用JMS向特定的ibm mq队列发送消息/从特定的ibm mq队列接收消息

更新时间:2022-06-22 04:22:56

1)要求您的供应商在消息上设置一个属性,例如供应商名称".然后,您可以使用该属性按供应商进行区分.如果无法在邮件上设置属性,则必须解析邮件有效负载并相应地更新数据库.

1) Ask your vendor to set a property, say "Vendor Name", on the message. Then you can use that property to differentiate by vendor. If property can not be set on a message, then you will have to parse the message payload and update database accordingly.

2)要求您的供应商在他们放入队列的消息上设置JMSReplyTo属性.然后,您可以使用JMSReplyTo的值将答复发送回供应商.此外,您还需要将供应商消息的JMSMessageID设置为应用程序正在发送的回复消息的JMSCorrelationID.这样,您的供应商可以将请求消息与您发送的回复消息相关联.

2) Ask your vendor to set JMSReplyTo property on the message they are putting in the queue. You can then use the value of the JMSReplyTo to send a reply back to vendor. Also you need to take the JMSMessageID of the vendor's message and set it as JMSCorrelationID of the reply message your application is sending. This way your vendor can correlate the request message with the reply message you sent.

希望这会有所帮助.