Author |
Message
|
ioat |
Posted: Mon Nov 05, 2007 12:52 am Post subject: Could I set customized property for MQ message using C API? |
|
|
Acolyte
Joined: 18 Jul 2005 Posts: 53
|
I'm using C API to access MQ, could I set some customized properties for the MQ message just like JMS property? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 05, 2007 1:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Yes - the JMS header is mapped onto the RFH2 header in the message, which can be manipulated in the C API.
The Using Java manual shows this mapping for you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Nov 05, 2007 2:07 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 05, 2007 2:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you're going to provide links to documentation, you might want to provide links to the IBM copies, rather than a mirror of unknown reliablity....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Nov 05, 2007 3:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Or use XMS. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 05, 2007 4:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
Or use XMS. |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
ioat |
Posted: Mon Nov 05, 2007 5:13 pm Post subject: |
|
|
Acolyte
Joined: 18 Jul 2005 Posts: 53
|
Thanks for all replies.
I'll do a reaserch for RFH2.
Actually, I just want to send a message from C to C and from C to Java, and I'm familiar with Java JMS. So I think, some of data are better stored in properties, not put into the message body.
The RFH2 can implement my request, right? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 05, 2007 8:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ioat wrote: |
Thanks for all replies.
I'll do a reaserch for RFH2.
Actually, I just want to send a message from C to C and from C to Java, and I'm familiar with Java JMS. So I think, some of data are better stored in properties, not put into the message body.
The RFH2 can implement my request, right? |
If you are already familiar with JMS look into the messaging support pack (XMS) which brings a JMS like interface and handling of the RFH2 to non java languages...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
ioat |
Posted: Mon Nov 05, 2007 9:00 pm Post subject: |
|
|
Acolyte
Joined: 18 Jul 2005 Posts: 53
|
Yes, the XMS is simililar to the JMS.
But I have already encapsulated the MQ API myself, just have a new request to set the message property.
If change to XMS, many codes need to be changed. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 06, 2007 3:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Building an RFH2 header - which is where JMS stores the properties - will require a lot of code. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ioat |
Posted: Tue Nov 06, 2007 5:38 pm Post subject: |
|
|
Acolyte
Joined: 18 Jul 2005 Posts: 53
|
Thanks, seems I couldn't use the RFH2 to set the property. I might append the property to the message tail. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 07, 2007 1:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ioat wrote: |
Thanks, seems I couldn't use the RFH2 to set the property. |
I'm surprised and disapointed to hear that.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 23, 2008 5:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You don't want to put custom properties at the END of a message.
You want to put them at the FRONT of a message.
If you somehow can't manage to use an RFH2 header, that is. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|