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 API Support » User defined message headers

Post new topic  Reply to topic
 User defined message headers « View previous topic :: View next topic » 
Author Message
amoljoshi
PostPosted: Fri Mar 11, 2005 3:53 am    Post subject: User defined message headers Reply with quote

Newbie

Joined: 31 Dec 2004
Posts: 6

Hi all,

Would appreciate detailed help regarding the following :
===============================================
We have a integration scenario for two applications written in different languages. One end application is always going to be a J2EE application and we do not know who the other end can be.It might be a C application or a Java application too. Basically needs to be a application with MQ interface available.

The MQ message data i.e. data to be exchanged is always going to be a file which i can pass as a bytes array.Along with it, i need to pass some mandatory information everytime.

The query is :
Can I have a message with some application defined headers included(name value pair like OriginTransactionId=orgn1234565) in the message as well as the file sent as the chunk of the bytes i.e.message data?
If this is possible, do all available sets of MQ APIs (Visual
Basic, C, C++, Java,COBOL etc) support the setting / getting the application defined header values?

If this is possible and somebody has already done this, PLEASE guide in detail.
===============================================


Thanks
Amol Joshi
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 11, 2005 3:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The MQ Rules and Formatting header is somewhat designed for this purpose.

If you do a setProperty in JMS, then the property is put into the MQRFH2 header.

There was a recent question from PeterPotkay about sample code for reading and writing the MQRFH2 header in C++.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
amoljoshi
PostPosted: Sun Mar 13, 2005 10:23 pm    Post subject: Reply with quote

Newbie

Joined: 31 Dec 2004
Posts: 6

Hi jefflowrey

thanks for the reply.
Based on the same I referred the doc "Application Programming Reference" from IBM which explains RFH2 / RFH headers in detail.

The RFH2 headers need the data( NameValueData)in the XML like format to the best of my knowledge which I can not do for some reasons. from the documentation I could figure out that may be MQRFH (& not MQRFH2) fits into the requirement.

I repeat the requirement :
I need to send some name value pairs [strictly in NonXML strcture, just for the sake of avoiding any heavy , XML aware customization of the other side] along with the data.

Which one to go for : MQRFH or MQRFH2??
Any known limitations of these???

-- Regards,
Amol
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Mar 14, 2005 10:39 am    Post subject: Reply with quote

Jedi

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

Quote:
The RFH2 headers need the data( NameValueData)in the XML like format

No. The RFH2 header stores the data in an XML like way, but in the API, you SET/GET a single field of the correct type.

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
RogerLacroix
PostPosted: Mon Mar 14, 2005 11:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

All,

Just to be even clearer on this subject:

RFH version 1 - data payload is stored as name / value pair

RFH version 2 - data payload is stored as one or more folders - each folder is an XML structure (and of course, you can use the set/get functions to access the data)

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
amoljoshi
PostPosted: Tue Mar 15, 2005 9:40 pm    Post subject: Reply with quote

Newbie

Joined: 31 Dec 2004
Posts: 6

Hi

What should the Java application use in this case? JMS apis and setXXXProperty functions or the MQ Java Apis? Is it possible to do this using MQ Java APIs??

Thanks
Amol J
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 16, 2005 5:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

amoljoshi wrote:
Is it possible to do this using MQ Java APIs??


The RFH2 is a WebSphere MQ "standard" header. IBM publishes all the information about the header, and it is supported in all WebSphere MQ environments (after, I think, 5.1?).

Therefore, you can create an RFH2 header in any programming language that allows you to use the WebSphere MQ API.

However, there are not presupplied functions or objects for working with the RFH2 header in a "programmer friendly" manner.

But there is tons of sample code all over the place for doing so.

All you have to do is look for it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
smantrala
PostPosted: Mon Jun 29, 2009 12:57 pm    Post subject: Reply with quote

Newbie

Joined: 29 Jun 2009
Posts: 3

jefflowrey wrote:
The MQ Rules and Formatting header is somewhat designed for this purpose.

If you do a setProperty in JMS, then the property is put into the MQRFH2 header.

There was a recent question from PeterPotkay about sample code for reading and writing the MQRFH2 header in C++.


Hello,

Could you please sample code or link to for reading MQRFH2 in c++ in this thread?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jun 29, 2009 1:02 pm    Post subject: Reply with quote

Grand High Poobah

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

smantrala wrote:
Could you please sample code or link to for reading MQRFH2 in c++ in this thread?


This post is 4 years old - times have changed. If you want to manipulate RFH2 in C++, use XMS.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Jun 29, 2009 5:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Vitor wrote:
smantrala wrote:
Could you please sample code or link to for reading MQRFH2 in c++ in this thread?


This post is 4 years old - times have changed. If you want to manipulate RFH2 in C++, use XMS.


And in the last 4 years XML has become more prominent. Even if one end does not have a full XML parser, name/value pairs in simple XML element and tag structures are pretty easy to parse, eg. <car color="red" wheels="4"/>
_________________
Glenn
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 API Support » User defined message headers
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.