简体   繁体   English

用Java实现IBM MQ COA

[英]Implement IBM MQ COA in Java

I am sending a messages to MQ from my Java application. 我正在从Java应用程序向MQ发送消息。 And I want to get the acknowledgement on the message I pushed. 我想得到我推送的消息的确认。 I know we can request COA (Conformation on arrival) from MQ Manager. 我知道我们可以从MQ Manager请求COA(到达确认)。 But I want to know which COA corresponds to the message I pushed. 但是我想知道哪个COA与我推送的消息相对应。

For example, I pushed two messages and I got one COA. 例如,我推送了两条消息,但得到了一份COA。 So how to identify which message has failed to reach MQ. 因此,如何确定哪个消息未能到达MQ。 Is there any identification in COA like, this COA is for message1 something like that? 在COA中是否有任何标识,例如,该COA用于message1之类的东西?

I am using Java8 and IBM MQ core library to push the message. 我正在使用Java8和IBM MQ核心库来推送消息。

By default Correlation ID of the COA message will be same as the message id of the original message. 默认情况下,COA消息的相关ID将与原始消息的消息ID相同。 So you can compare the Correlation ID of a COA message with the message id of the message you have put. 因此,您可以将COA消息的相关ID与您已放入的消息的消息ID进行比较。 See the description of MQRO_COPY_MSG_ID_TO_CORREL_ID here . 请参阅此处的MQRO_COPY_MSG_ID_TO_CORREL_ID的描述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM