Using Websphere MQ with JMS from a .NET Application

I am trying to send a message to a java server through WebSphere MQ, which uses JMS as a transport protocol. I can happily drop messages in MQ using the libraries provided by IBM, but the server rejects them. I assume (hopefully correctly) that this is due to the fact that I am missing the various JMS headers / properties in the MQ message.

I have ensured that the messages for the messages are the same, checking the queue (they are both cartographic messages, if that helps), but I do not want to fully implement the Websphere MQ protocol JMS to make this work.

I am wondering if anyone was able to achieve this, and if so, what is the minimum amount of information you need to indicate in the JMS header? Are there any alternatives for this directly in MQ (I saw some about using java interaction, but this is what I think will be redundant).

Any help would be greatly appreciated!

+6
c # jms ibm-mq
source share
4 answers

Can you insert the Java code that you use to read the message. This code assumes the message is "MapMessage". Typically, something queued from a non-java client will display as either TextMessage or BytesMessage.

The WebsphereMQ JMS api works fine with reading these messages without JMS headers, while you read as TextMessage / BytesMessage as put.

In my server code, my content is usually queued as bytes and therefore displayed as BytesMessage, but just in case I get a message that was manually queued, I catch a classcastexception and check to see if it is a TextMessage.

+2
source share

WebSphere MQ does not have very clear error messages. I suggest checking when something went wrong:

  • Information about the exception and their recursive reasons.
  • MQ error logs.
  • Event Logs Received by MQ.
  • .FDC.
+1
source share

Are you trying to use MQI to send JMS messages? Take a look at IBM's XMS libraries. They will provide everything you need. Libraries provide a .NET implementation of JMS that works with WebsphereMQ. I have used these libraries many times over the last year, talking between java and .net systems and was very pleased with the functionality.

Download XMS.NET Library

+1
source share

I think I had the same problem, and I could not get XMS to work. If this is still a problem for you, this may help.

Refers to Kristoffer

0
source share

All Articles