ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Can I configure a queue to ignore the JMS RFH header?

Post new topic  Reply to topic
 Can I configure a queue to ignore the JMS RFH header? « View previous topic :: View next topic » 
Author Message
TonyCooke
PostPosted: Sun Mar 05, 2006 4:27 pm    Post subject: Can I configure a queue to ignore the JMS RFH header? Reply with quote

Novice

Joined: 08 Feb 2006
Posts: 15

Hi all.

I have a third party application that uses JMS to put information on a queue and I have another application that uses the MQ native to get information from that queue.

Of course the MQ native application fails because there is JMS header information in there.

Can I configure the queue to ignore this JMS RFH header information?
ie. Can I set up the queue to say this is an MQ native queue so that they both can work.

Thanks in advance for any help you can give.

All the best,
Tony
Back to top
View user's profile Send private message
wschutz
PostPosted: Sun Mar 05, 2006 4:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

http://forum.java.sun.com/thread.jspa?forumID=29&threadID=207563
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
TonyCooke
PostPosted: Sun Mar 05, 2006 5:06 pm    Post subject: Hi Wayne. Reply with quote

Novice

Joined: 08 Feb 2006
Posts: 15

Hi Wayne.

I have seen this before but I don't think the third party is using JNDI and I cannot change the applications.

Am I missing something?

Sorry.

All the best,
Tony
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Mar 05, 2006 7:01 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

When using a reply to queue, you can do the following in JMS

Code:
String mynonjmsq = msg.getReplyTo().getName();
// should be something like "queue://hostqmgr/qname"
String adding = "?";
String nonjms = "targetClient=1";
// check for existing attributes
if (mynonjmsq.at("?") > 0) adding = "&";
mynonjmsq = mynonjmsq+adding+nonjms;
Queue nonjmsreplyto = Session.createQueue(mynonjmsq);


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
TonyCooke
PostPosted: Sun Mar 05, 2006 7:56 pm    Post subject: Reply with quote

Novice

Joined: 08 Feb 2006
Posts: 15

Hi fjb_saper.

The thing is I'm stuck in the middle, or rather MQ is.

What I have is, on one side I have an application that connects to a MQ queue using JMS. The other side is an application that connects to a MQ queue with the native MQ interface. Both applications I cannot touch. What I can touch is MQ in the middle.

So what I want to do to make these 2 talk nicely is to configure the queue or broker to just accept MQ messages and accept JMS messages without the header, or filter the JMS messages to not include the header.

If I can't touch the apps do I have any control over the messages or, more specifically, the JMS header?

Thanks.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Mar 06, 2006 1:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Is there a chance that the vendor's JMS program gets the queue name from a properties file, or the like? If so, you could change the qname to: queue:///SOME.QUEUE?targetClient=1
(which is fj's suggestion).

If not, then I think you're stuck with either wrting a simple flow using the broker to strip the rfh or a simple little java program to do it.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
TonyCooke
PostPosted: Mon Mar 06, 2006 3:07 am    Post subject: Reply with quote

Novice

Joined: 08 Feb 2006
Posts: 15

I thought as much. I think I'm stuck then.

I have been talking with them (on the JMS side) and we've been trying to work it out but so far nothing has worked. They will probably have to do a program change to allow for it but who knows when that'll happen.

It seems so many people have this issue I thought it may just be a config option on MQ itself.

No such luck. Thanks for everyone's help though. I greatly appreciate it.

All the best,
Tony
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 18, 2006 1:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

TonyCooke wrote:
I thought as much. I think I'm stuck then.

I have been talking with them (on the JMS side) and we've been trying to work it out but so far nothing has worked. They will probably have to do a program change to allow for it but who knows when that'll happen.

It seems so many people have this issue I thought it may just be a config option on MQ itself.

No such luck. Thanks for everyone's help though. I greatly appreciate it.

All the best,
Tony


Depends. If the client application is a WAS application (whether Websphere or Weblogic) the queue setup in done in JNDI and can be changed to specify in the JNDI settings for targetClient to have value = "MQ" instead of "JMS". That will suppress the header. You will only be stuck with getting the header when the app acts as a service as it will most likely be on the message for the replyto queue.

At the same time be prudent because it might disrupt the way the app works if it relies on properties being stored in the RFH header....

The broker can strip the RFH quite easily and put it back on when sending the reply...
This may become relevant if the correlationId is more than 24 bytes.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Can I configure a queue to ignore the JMS RFH header?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.