|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Wildcard, MQ Channel Table and JMS |
« View previous topic :: View next topic » |
Author |
Message
|
avakado |
Posted: Wed Mar 25, 2009 9:47 am Post subject: Wildcard, MQ Channel Table and JMS |
|
|
Newbie
Joined: 19 Mar 2009 Posts: 5
|
We have an application deployed to WebSphere 6.1 that uses a channel table to connect to WMQ. In the QCF definition, we specified the queue manager name as *QM, Client as the transport type, and a custom property for the channel table location named CDDTURL. We have two queue managers QM1 and QM2 remote to WAS. This configuration is being used for failover at the MQ level.
The application uses a request / reply messaging pattern.
Everything is working when the target client for the JMS request queue is set to MQ, but when we change to JMS it fails.
In the RFH2 header, the RTO field gets populated as: queue:///REPLYTO.Q
However, the MQ header has the correct Reply Q and Reply to QMgr.
We can not set the base queue manager property in JNDI for the reply queue, since we do not know which queue manager we will connect to (in case of failover).
Is there anyway to obtain the queue manager name so that we can set the JMS ReplyTo field on the request message or another other solution?
Thanks,
avakado |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 26, 2009 3:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Bizarre. I would like to know how you look at the JMSReplyto destination and how you populate it....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
avakado |
Posted: Thu Mar 26, 2009 11:36 pm Post subject: |
|
|
Newbie
Joined: 19 Mar 2009 Posts: 5
|
fjb_saper,
we tried the following:
Queue replyQueue = (Queue)ctx.lookup("jms/reply");
Destination replyQueue2 = queueSession.createTemporaryQueue();
Destination replyQueue3 = queueSession.createQueue("REPLYTO.Q");
outMessage.setJMSReplyTo(replyQueueX);
Note that queueSession.createTemporaryQueue() works when the target client is JMS or MQ. It creates the correct RTO field in the RFH2 header with the correct queue manager name.
Queue replyQueue = (Queue)ctx.lookup("jms/reply"); - only works with the base queue manager name is populated in the JNDI definition. Unfortunately, this will not work for us, since we do not know the queue manager name prior to execution.
The third option does not help.
avakado |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Mar 28, 2009 1:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Try following:
Code: |
Queue replytoQueue = (Queue)ctx.lookup("jms/replytoqueue");
String strqueue = replytoQueue.getName(); // you get the uri form
Queue replyQueue = session.createQueue(strqueue);
msg.setJMSReplyTo(replyQueue);
|
As the queue was created from the URI you should be able to get the qmgr in the Reply to. Didn't try it so no guarantees.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
avakado |
Posted: Sun Mar 29, 2009 6:56 am Post subject: |
|
|
Newbie
Joined: 19 Mar 2009 Posts: 5
|
fjb_saper,
Unfortunately that did not work. The JMS spec doesn' t mention if the complete URI needs to be returned when createQueue is called. The method does not create an actual physical queue like createTemporaryQueue.
avakado |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Mar 29, 2009 10:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You have to experiment a little. In JMS, some of the stuff, like the replyto Destination is only final after the put of the message (call of the send method). The put itself is supposed to add the qmgr name. For this to happen right, I suppose the Destination needs to be created by the relevant session. Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|