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 » Is it possible to set user defined attribute for MQMessage?

Post new topic  Reply to topic
 Is it possible to set user defined attribute for MQMessage? « View previous topic :: View next topic » 
Author Message
aptesameer
PostPosted: Sat Jan 27, 2007 4:12 am    Post subject: Is it possible to set user defined attribute for MQMessage? Reply with quote

Newbie

Joined: 18 Jan 2007
Posts: 2
Location: India

I have worked on MQ-JMS. While working with MQ-Java I'm not getting how to put user defined attributes for the MQMessage. In other words I'm looking for some way which is equivalent to the setStringAttribute() method in case of JMS.

e.g.

setStringAttribute("NAME","SAMEER") >> JMS
???? >> MQ

Thanks in advance..
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Jan 27, 2007 5:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The MQ JMS Provider puts those things into the MQRFH2 header on the MQ message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
aptesameer
PostPosted: Sun Jan 28, 2007 11:03 pm    Post subject: Reply with quote

Newbie

Joined: 18 Jan 2007
Posts: 2
Location: India

Thanks freind, but i'm looking for the way by which I can set user defined attribute... i dont know which method to use... So if u can guide me in this context it will simplify my life can u redirect me to some sample code...
thanks once again
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 29, 2007 2:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can also create an MQRFH2 header, and put your user defined properties in that.

Otherwise, the MQMD header does not have any place to put user defined properties. So the choices that are available are to add another header (like the MQRFH2) or to put your properties in the message data some how.

There is sample code around somewhere for writing an MQRFH2 header from plain Java. But I don't have a link handy.
_________________
I am *not* the model of the modern major general.
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 » Is it possible to set user defined attribute for MQMessage?
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.