Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can JMS + MQ work together?

 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all-
I'm working with MA88 (IBM's release of JMS that uses MQ5.2) and I made the assumption that I could send a JMS message to a reciever that would read it using the older MQ 5.2 MQI (since MA88 is a type of JMS-MQ bridge). It seems that I am wrong, that the message includes a JMS header which screws up the receiver. Someone told me I can omit this header for such clients? Is this possible? Are JMS and MQ (under IBM) interoperable?
thansk,
Max Tomlinson
 
Matt Midcap
Sheriff
Posts: 440
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Max,
I'm going to move this to the "Other Java APIs" where hopefully you can get more responces on your question.
Matt
 
Eric Stephens
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not claiming to be an expert on the topic or anything, but...
I tested this the other day connecting from a Windows machine over to a Queue on a z/OS box and and initial test seemed to work ok. Can you explain more about the header information? There is a setting that you need to put into LDAP to indicate that you are a JMS client.
------------------
Eric A. Stephens, SCJP
Software Architect, Mentor, & Instructor
ericastephens@mycingular.com
 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's is what the MQ client on the other end is seeing:
The RFH stuff up to the "OGIM0100" is all JMS header.
BTW, this doesn't use LDAP.
thansk,
Max
RFH ...-...-..--..-.MQSTR ......-.... <mcd><Msd>jms_text</Msd></mcd>
...P<jms><Dst>queue:///GBS.IMSA.INPUT.QUEUE</Dst><Rto>queue:///GBS.QUEUE</Rt
o></jms>OGIM0100 OpenGBSTest
000 etc.
 
Swatantra Yadav
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Max,
I am not sure this is an answer to your query. But I was able to run the JMS samples that IBM has provided using MQSeries 5.2.
My JMSAdmin.config file had following settings:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file://C:/temp
SECURITY_AUTHENTICATION=none
PTPSample01 :
* This program connects to the default queue manager on the local machine
* using the MQ Classes for Java bindings. It then sends a message to the queue SYSTEM.DEFAULT.LOCAL.QUEUE and reads it back again.
It is sending a text messages and does not set any JMSHeaders or properties. for JNDI a file called .bindings is created when I ran the ivtSetUp.bat
But I must say that the MQSeries was not easy to install and way more difficult that using J22ee 1.3 JMS provider. I still havent figured it out. Specially its Queue Manager and Channel terrify me. I guess it is because it is a real world application and not a toy (;-
hope that helps.
-Swatantra
 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply-
I think the mistake I made was in assuming that I could send using JMS and that the other side coudl receive using MQ. Both sides have to sue JSm in roder fot this to work, unless some kind of mapper is used.
 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's try that typo-free:
Thanks for the reply-
I think the mistake I made was in assuming that I could send using JMS and that the other side could receive using MQ. Both sides have to use JMS in order for this to work, unless some kind of mapper is used.
 
D Shetler
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having this MQ JMS problem. Were you able to solve your problem?
 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using Pub/Sub or point-to-point?
 
Y.F
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If one side of your application is JMS and the other is MQ application (i.e, MQ Java or MQ C++); in order for the MQ application to read the message JMS sent you need to configure the "TARGCLIENT" field in you JMS Queue or Topic to be "MQ".
For example
InitCtx> define q(TESTQ) TARGCLIENT(MQ)
JMS uses RFH2 headers, where MQ uses RFH1 headers. So if you sent the message from JMS application without specifying TARGCLIENT to be MQ the messgae will have RFH2 headers and MQ applications wouldn't know what to do with it.
Good luck
 
Bill Mc
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use this parameter :
queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
and JMS will not use it's headers
 
Allan Huang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One other options is to use the following code in your JMS message sending application to create the queue.
testQueue = session.createQueue("queue://QueueManager/Queue?targetClient=1");
Then the message will be sen as MQSTR format.
We are using WebSphere MQ 5.3 and this works for us.
Cheers
Allan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic