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 » How to set the Application Identity Data for a Message

Post new topic  Reply to topic
 How to set the Application Identity Data for a Message « View previous topic :: View next topic » 
Author Message
VijayGoparaju`
PostPosted: Thu Nov 06, 2008 10:43 pm    Post subject: How to set the Application Identity Data for a Message Reply with quote

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
View user's profile Send private message
xhaxk
PostPosted: Thu Nov 06, 2008 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
VijayGoparaju`
PostPosted: Fri Nov 07, 2008 12:55 am    Post subject: Reply with quote

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
View user's profile Send private message
atheek
PostPosted: Fri Nov 07, 2008 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Nov 07, 2008 3:16 am    Post subject: Reply with quote

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
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 » How to set the Application Identity Data for a Message
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.