Posted: Thu Dec 07, 2006 9:01 am Post subject: Looging the exception to an error queue
Newbie
Joined: 28 Nov 2006 Posts: 5
Hi
I am newbee to Message broker.
I am getting a message from http input node and trying to handle the exception by logging the error message to a mq queue.. The exception happened when the output queue is not present.
I am not able to log the error message to error queue. Can anyone has anyidea how to handle the RecoverableException? The following is my esql code:
DECLARE i INTEGER 1;
DECLARE count INTEGER;
SET count = CARDINALITY(InputExceptionList.[]);
WHILE i <= count DO
--use the default tooling-generated procedure for copying message headers
Set OutputRoot.Properties.MessageDomain ='XML';
SET "OutputRoot"."Properties"."MessageFormat" = 'XML';
SET OutputRoot.HTTPInputHeader = null;
---Add MQMD Header
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
SET OutputRoot.MQMD.Version=MQMD_CURRENT_VERSION;
SET OutputRoot.MQMD.StrucId=MQMD_STRUC_ID;
SET OutputRoot.XML.(XML.XmlDecl)= '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) ='1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") ='UTF-8';
--CALL CopyEntireMessage();
SET OutputRoot.XML = InputBody;
PROPAGATE to TERMINAL 'out1';
SET i = i+1;
END WHILE;
RETURN true;
Thanks for your suggestion. I am able to log the message.
The real problem is 2097 0x00000831 MQRC_CONTEXT_HANDLE_ERROR
The issue is with losing the context when the message comes through HttpInput node then MQoutput node.
The solution is to check "Set All" for the Message Context for MQOutput node and it takes care of this error.
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