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 » MQ Message has MQRFH2 Header that we dont want

Post new topic  Reply to topic
 MQ Message has MQRFH2 Header that we dont want « View previous topic :: View next topic » 
Author Message
aidanmcg33
PostPosted: Thu Jul 18, 2013 9:59 am    Post subject: MQ Message has MQRFH2 Header that we dont want Reply with quote

Newbie

Joined: 18 Jul 2013
Posts: 5

We are using mq7 with a java sender. We are not using jms.
The message gets sent and the client cannot receive it because it has a mqrfh2 header. how can the header be removed before the message is sent?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 18, 2013 11:13 am    Post subject: Re: MQ Message has MQRFH2 Header that we dont want Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aidanmcg33 wrote:
how can the header be removed before the message is sent?


Search the forum; this question has been asked & answered many times.

If you need a hint, use TARGCLIENT as a search term
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aidanmcg33
PostPosted: Thu Jul 18, 2013 11:26 am    Post subject: mqrfh2 header Reply with quote

Newbie

Joined: 18 Jul 2013
Posts: 5

I must be blind because ive been searching it for a couple of hours now and cant find a solution that references an application & solution not using jms.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 18, 2013 11:48 am    Post subject: Re: mqrfh2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aidanmcg33 wrote:
I must be blind because ive been searching it for a couple of hours now and cant find a solution that references an application & solution not using jms.


Yes you must. For experimental purposes I did a search and got 5 pages of good hits, the 3rd hit on the 1st page being an exact match for your scenario.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aidanmcg33
PostPosted: Thu Jul 18, 2013 11:53 am    Post subject: mqrfh2 header Reply with quote

Newbie

Joined: 18 Jul 2013
Posts: 5

I have gone through loads of results but they all reference JMS code. I am not using JMS
My queue instance is com.ibm.mq.MQQueue
and my message instance is com.ibm.mq.MQMessage
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 18, 2013 11:59 am    Post subject: Re: mqrfh2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aidanmcg33 wrote:
I have gone through loads of results but they all reference JMS code. I am not using JMS


So your Java client is not using JMS and yet an RFH2 is magically appearing on the message you're sending?

Any chance you're using a WMQv7 queue manager set to compatibility mode & you're setting message properties on the message you're putting?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aidanmcg33
PostPosted: Thu Jul 18, 2013 12:01 pm    Post subject: mqrfh2 header Reply with quote

Newbie

Joined: 18 Jul 2013
Posts: 5

I dont know what QM is being used but I do know it's version 7.
With regards to the message I'm setting the applicationIdData string and the format to "MQSTR "
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 18, 2013 12:09 pm    Post subject: Re: mqrfh2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aidanmcg33 wrote:
With regards to the message I'm setting the applicationIdData string and the format to "MQSTR "


You should be using the constant rather than the literal string but that's not going to be your problem.

What about message properties? Are you setting anything outside the MQMD?

Or to perhaps ask a better question, what's in the RFH2 when it gets to the receiving side?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aidanmcg33
PostPosted: Thu Jul 18, 2013 12:11 pm    Post subject: mqrfh2 header Reply with quote

Newbie

Joined: 18 Jul 2013
Posts: 5

Not setting anything other than the properties listed and the open/put options. Everything else is basic connecting and putting.
I don't have access to the mqrfh2 header so cannot tell you what inside it. I just need to know how I can disable it from within the application.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 18, 2013 12:20 pm    Post subject: Re: mqrfh2 header Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aidanmcg33 wrote:
I just need to know how I can disable it from within the application.


You're not deliberately adding it in your code, you're not setting message properties (which would be expressed as an RFH2 by a v7 qmgr in compatibility mode) and you're not using JMS (which automatically uses an RFH2 to hold the additional JMS properties).

Hence logically you can't disable it because you're not enabling it. The next course of action is to examine the header to see what is adding it to the message payload (as WMQ will only do it in the last 2 cases I list above) and get that disabled.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 18, 2013 11:22 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Can you show your code that builds the mqmessage and the sender?

Can you show the output of amqsbcg (or amqsbcgc) from running your code to send a message to a qlocal on a test qmgr?
Back to top
View user's profile Send private message
nsnicola
PostPosted: Fri Jul 19, 2013 7:08 am    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2013
Posts: 2

Is it possible that our program uses the JMS properties in the RFH2 header instead of the MQMD properties? If so, do you know if we can adjust it by a MQMD property?
Back to top
View user's profile Send private message
nsnicola
PostPosted: Fri Jul 19, 2013 7:10 am    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2013
Posts: 2

Attached the code used.

Code:

        MQEnvironment.hostname = "HOSTNAME";
        MQEnvironment.channel = "CHANNEL_NAME";
        MQEnvironment.port = 11414;
        MQEnvironment.CCSID = 1208;
       
        final MQQueueManager mqQueueManager = new MQQueueManager("QUEUE_MANAGER_NAME");
        final int mqOpenOptions = MQConstants.MQOO_FAIL_IF_QUIESCING | MQConstants.MQOO_OUTPUT | MQConstants.MQOO_SET_IDENTITY_CONTEXT;;
        final MQQueue mqQueue = mqQueueManager.accessQueue("OUTPUT_QUEUE_NAME", mqOpenOptions);
        final MQPutMessageOptions mqMsgOptions = new MQPutMessageOptions();
        mqMsgOptions.options = MQConstants.MQPMO_SET_IDENTITY_CONTEXT | MQConstants.MQPMO_SYNCPOINT;;
       
        final MQMessage mqMessage = new MQMessage();
        mqMessage.applicationIdData = "APP_IDAPP_PASSWORD";
        mqMessage.format = MQConstants.MQFMT_STRING;
        mqMessage.write(message.getBytes("UTF-8"), 0, message.length());
        mqQueue.put(mqMessage, mqMsgOptions);
        mqQueueManager.commit();
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ Message has MQRFH2 Header that we dont want
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.