I'm trying to consume JMS messages send over WebSphere MQ (WebSphere MQ Server v7) by .NET application using .NET WMQ API. I'm using WebSphere MQ Client v7.5 and amqmdnet.dll version 7.5.0.0.
There is some very strange behavior when reading JMSDeliveryMode
property (Dlv
property from jms
RFH2 folder). The property value send by JMS application (servlet hosted in WebSphere Application Server v7) is set to Persistent
(2) but my .NET client always reads 1 (which means Non_persistent
). I need to read the correct value because my .NET application works as router/forwarder and it must forward message with correct configuration.
I tried to simulate JMS messages using RFHUtils. When I set delivery mode to 1 and send it to my .NET client it again reads 1 but if I also change persistence of MQ message in MQMD it reads 0. It looks like the value in JMSDeliveryMode
is not used at all and .NET client always reads value from Persistence
property but it is incorrect behavior! These two properties have different ranges of correct values:
JMSDeliveryMode
correct values (from jms.jar):
- 1 -
DeliveryMode.NON_PERSISTENT
- 2 -
DeliveryMode.PERSISTENT
Persistence
correct values (from amqmdnet.dll):
- 0 -
MQC.MQPER_NOT_PERSISTENT
- 1 -
MQC.MQPER_PERSISTENT
- 2 -
MQC.MQPER_PERSISTENCE_AS_Q_DEF
/MQC.MQPER_PERSISTENCE_AS_TOPIC_DEF