|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to set the Application Identity Data for a Message |
« View previous topic :: View next topic » |
Author |
Message
|
VijayGoparaju` |
Posted: Thu Nov 06, 2008 10:43 pm Post subject: How to set the Application Identity Data for a Message |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
Hello,
I have a requirement, I want to put a value to ApplicationIdData for a queue message.I have tried by using this:
queueMessage.ApplicationIdData="ABCDEFG"
but its not working.The message property is still remaining as null.
Please tell how to set this value.
Thanks...
Vijay...... |
|
Back to top |
|
 |
xhaxk |
Posted: Thu Nov 06, 2008 11:11 pm Post subject: |
|
|
Apprentice
Joined: 30 Oct 2008 Posts: 31
|
Quote: |
ApplIdentityData (MQCHAR32)
This is part of the identity context of the message. For more information about message context, see Overview; also see the WebSphere MQ Application Programming Guide.
ApplIdentityData is information that is defined by the application suite, and can be used to provide additional information about the message or its originator. The queue manager treats this information as character data, but does not define the format of it. When the queue manager generates this information, it is entirely blank.
For the MQPUT and MQPUT1 calls, this is an input/output field if MQPMO_SET_IDENTITY_CONTEXT or MQPMO_SET_ALL_CONTEXT is specified in the PutMsgOpts parameter. If a null character is present, the null and any following characters are converted to blanks by the queue manager. If neither MQPMO_SET_IDENTITY_CONTEXT nor MQPMO_SET_ALL_CONTEXT is specified, this field is ignored on input and is an output-only field. For more information on message context, see the WebSphere MQ Application Programming Guide.
After the successful completion of an MQPUT or MQPUT1 call, this field contains the ApplIdentityData that was transmitted with the message. If the message has no context, the field is entirely blank.
|
From the APR. How easy was that? |
|
Back to top |
|
 |
VijayGoparaju` |
Posted: Fri Nov 07, 2008 12:55 am Post subject: |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
Hi,
I have used this code for assigning Application id data to message,but remaining things are working finebut it is not puuting that id to the message.
queueMessage.ReplyToQueueManagerName = "ABCDEF";
queueMessage.ApplicationIdData = "ABCD";
queueMessage.Persistence =MQC.MQPER_PERSISTENT;
queuePutMessageOptions = new MQPutMessageOptions();
queue.Put(queueMessage, queuePutMessageOptions);
Please reply me how to put.
Thanks,
Vijay.... |
|
Back to top |
|
 |
atheek |
Posted: Fri Nov 07, 2008 3:14 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Set identity context in open options
int openOptions = MQC.MQOO_OUTPUT+MQC.MQOO_SET_IDENTITY_CONTEXT
Set Identity context in put message options
queuePutMessageOptions = new MQPutMessageOptions();
queuePutMessageOption.options=MQC.MQPMO_SET_ALL_CONTEXT
queue.Put(queueMessage, queuePutMessageOptions); |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 07, 2008 3:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
VijayGoparaju` wrote: |
queuePutMessageOptions = new MQPutMessageOptions();
|
If you re-read the post of xhaxk or the original section of the manual he's quoting, you'll see why this line is wrong.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|