如何在Spring集成中组装MQ消息段 [英] How to assemble segments of MQ messages in Spring integration
问题描述
在使用Spring Integration JMS Jms.messageDrivenChannelAdapter时如何处理/组装MQ消息的各段.?我确实找到了一些有关使用MQ API时如何做的参考.
How to handle/assemble segments of a MQ message when using Spring Integration JMS Jms.messageDrivenChannelAdapter. ? I did find some reference on how to do in when using MQ API .
https://medium.com/@ marcus_j/using-segmented-ibm-mq-messages-in-java-cbdee4a9ad85
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_ALL_SEGMENTS_AVAILABLE
| MQC.MQGMO_SYNCPOINT
| MQC.MQGMO_COMPLETE_MSG;
gmo.matchOptions = MQC.MQMO_NONE;
gmo.waitInterval = 10000;
MQMessage message = new MQMessage();
queue.get(message, gmo);
// Do your stuff with the message
message.clearMessage();
queue.close();
manager.disconnect();
根据我的理解,我将必须传递适当的MQGetMessageOptions,以便能够请求队列管理器重新组合消息(如果已被分段).使用spring JMS时,找不到有关如何传递这些选项的参考.
Per my understanding i will have to pass the appropriate MQGetMessageOptions , to be able to ask the queue manager to reassemble the message if it has been segmented. Could not find any reference on how to pass these options when using spring JMS .
推荐答案
Unfortunately IBM MQ does not support Message segmentation in JMS:
IBM®MQ for z/OS®或使用 IBM MQ JMS类的应用程序不支持此功能.
This feature is not supported on IBM® MQ for z/OS® or by applications using IBM MQ classes for JMS.
这篇关于如何在Spring集成中组装MQ消息段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!