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 » Message Header

Post new topic  Reply to topic
 Message Header « View previous topic :: View next topic » 
Author Message
Rohit_
PostPosted: Tue Nov 11, 2008 3:13 pm    Post subject: Message Header Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 24

Hi Forum,

I am confused with Header part of message.

I am publishing messages to queue like this :

Code:


private Session session;
   
private MessageProducer producer;
....   

TextMessage ackMsg = session.createTextMessage();
ackMsg.setText("Some XML");         
producer.send(ackMsg);



Do I need to worry about header?means do I have to explicitly set header or JMS api will take care of it?
will the application receiving this message will get message with header?


thanks in advance.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 11, 2008 4:45 pm    Post subject: Reply with quote

Grand High Poobah

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

If you're using the JMS libraries, the message will contain the JMS header. If you're using the native Java API it won't. Check the Java manuals for how this is expressed in the WMQ world. Also look up TARGCLIENT.

How the receiving application handles it is a coding issue. There's no reason why a non-Java application can't process a message sent with a JMS header.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Rohit_
PostPosted: Tue Nov 11, 2008 5:04 pm    Post subject: Reply with quote

Novice

Joined: 10 Jan 2008
Posts: 24

My app is running outside of WebSphere Application Server,while the app getting my messages is MDB running in WS app server.

So in instance of my destination, i did this :

producer.setTargetClient(JMSC.MQJMS_CLIENT_JMS_COMPLIANT );

So, I hope JMS lib will take care of header.

thanks for reply.
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 » Message 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.