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 » How to remove MQHRF2 header in java program?

Post new topic  Reply to topic
 How to remove MQHRF2 header in java program? « View previous topic :: View next topic » 
Author Message
grahamgjl
PostPosted: Thu Oct 14, 2004 7:15 am    Post subject: How to remove MQHRF2 header in java program? Reply with quote

Newbie

Joined: 14 Oct 2004
Posts: 4

I am getting a message with a MQHRF2 header and wish to remove this headre before adding the message to another queue in a java program. I have searched the docs but can not find any way of doing (newbie)
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Oct 14, 2004 7:44 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

It sounds like you are using JMS to put a message and you have your targclient property set to JMS. Try setting it to MQ and you won't get the header in the first place.

If this doesn't make any sense, check out the table in the Using JMSAdmin section of the Using Java manual or post back.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Thu Oct 14, 2004 8:48 am    Post subject: Reply with quote

Grand High Poobah

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

Alternatively use JMS instead of base java and the header will be removed automatically
Back to top
View user's profile Send private message Send e-mail
grahamgjl
PostPosted: Wed Oct 27, 2004 6:07 am    Post subject: Reply with quote

Newbie

Joined: 14 Oct 2004
Posts: 4

Hi Thanks for the replys.


I am new to this and only have the base MQ sample programs to use so if anyone can point to the same examples for JMS then that would be good. However I have no choice to set the client type on the message this is done by the application. I have to retrieve the messages from one queue and add to another but because the messages were added by a JMS app and I am using the base MQ API I am unable to find any method to remove the header.

How do I set target client to MQ when retrieving a message with a JMS header using base java? I can then add the message back to the second queue in MQ format


Thanks
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Oct 27, 2004 7:25 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
if anyone can point to the same examples for JMS

These should have been installed, as long as you did a Custom install and selected Java.
Quote:
I have to retrieve the messages from one queue and add to another but because the messages were added by a JMS app and I am using the base MQ API

This sounds like you are acting as a "middle man" here, just to strip off the RFH2. Why can't the receiving application do it. Or write this in JMS.
Quote:
How do I set target client to MQ when retrieving a message with a JMS header

That option is only for the application that PUTs the message.

If you are using the normal API set, or non-JMS Java, then the RFH2 header comes in as part of the payload. It would be easy enough to check the Format of the incoming message, and if it's an RFH2, then one of the fields in the RFH2 gives the total length of the header. Just skip that part, and PUT what's left. You will have to "move" a couple of fields from the RFH2 header back to the MQMD, like the Format, to ensure it's still described correctly.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
bamboozled_by_MQ
PostPosted: Wed Oct 27, 2004 8:41 am    Post subject: Reply with quote

Voyager

Joined: 07 Jan 2004
Posts: 75

bower are you able to even set the Target Client property to MQ in the admin console?

It appears vennela, jefflowery and myself cannot do it in ours?!
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Oct 27, 2004 9:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You can only set the TargetClient property for WebSphere MQ JMS resources. If you are running with the embedded JMS, then it is expected that you are communicating with other JMS applications and the default is to have it set.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Wed Oct 27, 2004 2:16 pm    Post subject: Reply with quote

Grand High Poobah

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

bamboozled_by_MQ wrote:
bower are you able to even set the Target Client property to MQ in the admin console?

It appears vennela, jefflowery and myself cannot do it in ours?!


Yeah known problem. Go into the corresponding xml resource file and change "JMS" to "MQ" on the corresponding queue attribute, save and reboot the server. Now it should stick.
Had the same problem a while back....

Enjoy
Back to top
View user's profile Send private message Send e-mail
bower5932
PostPosted: Thu Oct 28, 2004 6:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I think the fix being talked about is:

http://www-1.ibm.com/support/docview.wss?uid=swg1PQ78207
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to remove MQHRF2 header in java program?
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.