|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Passing the Context same as getting while putting ??? |
« View previous topic :: View next topic » |
Author |
Message
|
abiram8 |
Posted: Tue Jan 20, 2004 4:26 am Post subject: Passing the Context same as getting while putting ??? |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi,
We have the application which decides the messageID and userID and applicationIDdata,date and time is set from the sending application.
So we use the
openOptions as
int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_SET_ALL_CONTEXT +MQC.MQPMO_PASS_IDENTITY_CONTEXT;
and put message option as
pmo.options=MQC.MQPMO_NONE+MQC.MQPMO_SET_ALL_CONTEXT;
Our critical requirment is to have same messageID when ever I do
get and then do a put message to a same Q.
but when I get message from the same queue.
with openOption
int openOptionsGet = MQC.MQOO_OUTPUT +MQC.MQOO_SAVE_ALL_CONTEXT;
and gmo.options with : MQC.MQGMO_NONE
and when I try to put the message .The messageID changes
Iam not getting the msgID which is set previously by me.
1)Is it possible.
2)Iam using correct option ???
Abiram |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Jan 20, 2004 6:57 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Double-check in the Application Programming Reference. The message id/correlation id is NOT part of the context information.
Edited this append to add the not that I left out...thanks, Roger.
Last edited by bower5932 on Tue Jan 20, 2004 8:41 am; edited 1 time in total |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jan 20, 2004 7:35 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Bower5932,
MsgID and CorrelID are NOT part of the "context information".
Origin Context includes:
- PutApplType
- PutApplName
- PutDate
- PutTime
- ApplOriginData
Indentity Context includes:
- UserIdentifier
- AccountingToken
- ApplIdentityData
MsgID and CorrelID are fields of the MQMD like persistence, priority, Format, etc... You do not need to "SET CONTEXT" to set the regular fields of the MQMD.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Jan 20, 2004 8:40 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Oops...I actually looked in the manual (to make sure I referenced the right one) and then typed in my append and left out the NOT. I should have posted:
The message id/correlation id is NOT part of the context information.
I guess this just confirms that I type faster than I think....Sorry for the confusion and thanks for catching it. |
|
Back to top |
|
 |
kman |
Posted: Wed Jan 21, 2004 12:14 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
You can preserved the GET MsgId and CorrelID, and then set it to the PUT MsgId and CorrelId. That is done outside of the MQPMO_PASS_ALL_CONTEXT. At least it works for me. |
|
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
|
|
|
|