|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Copy message retains report setting |
« View previous topic :: View next topic » |
Author |
Message
|
jkoconnell |
Posted: Mon Nov 15, 2010 10:57 am Post subject: Copy message retains report setting |
|
|
Newbie
Joined: 24 Feb 2005 Posts: 8
|
I am copying a message from inputQ to forwardQ using native Java. Very straightforward. Open inputQ and get message with MQC.MQOO_PASS_ALL_CONTEXT;
Put to forwardQ
int forwardQoptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING;
forwardQoptions |= MQC.MQOO_PASS_ALL_CONTEXT;
forwardQ = qMgr.accessQueue(sForwardQueue, forwardQoptions, null, null, null);
MQPutMessageOptions forwardPMO = new MQPutMessageOptions();
forwardPMO.options = MQC.MQPMO_SYNCPOINT;
forwardPMO.options |= MQC.MQPMO_PASS_ALL_CONTEXT;
forwardPMO.contextReference = inputQ;
forwardQ.put(inputMessage, forwardPMO);
However, the report options of the original message are being copied to the forwardQ message. The forwardQ is a remoteQ that has no relation to the sender of the inputQ message, so the COA request causes a problem.
How do I clear the report options when putting the message on forwardQ?
I tried adding
forwardPMO.options |= MQC.MQRO_NONE;
before the put, but it did not make a difference.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 15, 2010 11:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So the PMO only controls what fields in the MQMD are writeable and/or are reset when you Put.
If you want to alter the contents of the MQMD, including the Report field, you need to alter the MQMD. |
|
Back to top |
|
 |
jkoconnell |
Posted: Mon Nov 15, 2010 12:19 pm Post subject: |
|
|
Newbie
Joined: 24 Feb 2005 Posts: 8
|
Thanks, I thought I tried this but must have had an error.
inputMessage.report = MQC.MQRO_NONE;
right before
forwardQ.put(inputMessage, forwardPMO);
That fixed it. |
|
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
|
|
|
|