|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Cop msg between queues with save contex |
« View previous topic :: View next topic » |
Author |
Message
|
kurt |
Posted: Thu Jul 03, 2008 3:10 am Post subject: Cop msg between queues with save contex |
|
|
Newbie
Joined: 03 Jul 2008 Posts: 2
|
Hello,
i tried to write some java-code to copy a message from a source queue to a destination queue.
I got the RC=2098.
This means, the source queue was open with:
MQConstants.MQOO_BROWSE|MQConstants.MQOO_SAVE_ALL_CONTEXT
I want to keep the contex like to tool ma01.
Here some code from putting the message:
...
int putopenptions=MQConstants.MQOO_INPUT_AS_Q_DEF | MQConstants.MQOO_OUTPUT;
MQQueue queue2=null;
MQMessage message2=new MQMessage();
putopenptions=MQConstants.MQOO_INPUT_AS_Q_DEF | MQConstants.MQOO_OUTPUT|MQConstants.MQOO_PASS_ALL_CONTEXT;
putMessageOptions=new MQPutMessageOptions();
putMessageOptions.contextReference=sourcequeue;//set contex from source queue
putMessageOptions.options=MQConstants.MQPMO_NEW_CORREL_ID|MQConstants.MQPMO_NEW_MSG_ID|MQConstants.MQPMO_PASS_ALL_CONTEXT;
queue2 = qMgr.accessQueue("TESTQ", putopenptions);
message2.writeChars(msgText);
...
Is there any possible to handle this issue.
Thanks.
queue2.put(message2,putMessageOptions); |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jul 03, 2008 9:17 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
kurt |
Posted: Fri Jul 04, 2008 3:53 am Post subject: |
|
|
Newbie
Joined: 03 Jul 2008 Posts: 2
|
Thanks,
but i wan't to move message.
I browse the particular message and save the context. After this, i would like put the message, as into another queue at the same QMGR.
Does anybody, how this handle the tool "ma01"?
Example:
"Copy messages between Queues : q -iQ1 -oQ2"
rg Michael D. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Jul 04, 2008 8:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
kurt wrote: |
but i wan't to move message. |
Then change the Destructive Get to a Non-destructive Get (Browse)!!
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
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
|
|
|
|