将IBM MQ迁移到javax.jms.*实现-MQOPEN如何转换为JMS API?

将IBM MQ迁移到javax.jms.*实现-MQOPEN如何转换为JMS API?

问题描述:

在将MQ与JMS api一起使用时,如何获得与ibm专有的mq api的openOptions相同的效果?

How do you get the same effect as ibm's proprietary mq api's openOptions when using MQ with JMS api?

JMS API中甚至还有openOptions的概念吗?如果是这样,那么在API类/方法方面有什么等效之处?

Is there even a concept of openOptions in the JMS API? If so, what is the equivilent in terms of the API classes/methods?

相关的堆栈溢出问题-migrating-from-ibm-mq-to -javax-jms-weblogic

您正在比较苹果和橙子.是的,两者都是水果,但它们是完全不同的水果. 2之间没有直接比较.

You are comparing apples and oranges. Yes, both are fruit but they are completely different fruit. There is no direct comparison between the 2.

1)具有"transacted"和"createSender"的JMS会话基本上是带有同步点的开放输出. 即

1) A JMS session with "transacted" and "createSender" is basically an open output with syncpoint. i.e.

// Open Options
int oo = MQC.MQOO_OUTPUT + MQC.MQOO_INQUIRE + MQC.MQOO_FAIL_IF_QUIESCING;
// Put Msg Options
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_SYNCPOINT + MQC.MQPMO_FAIL_IF_QUIESCING;

2)使用"createReceiver"(未事务处理)的JMS会话基本上是一个开放的输入. 即

2) A JMS session with "createReceiver" (non-transacted) is basically an open input. i.e.

int oo = MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_INQUIRE + MQC.MQOO_FAIL_IF_QUIESCING;
// Get Msg Options
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_FAIL_IF_QUIESCING;