Posted: Thu May 19, 2011 9:23 am Post subject: Segmentation question
Centurion
Joined: 06 Oct 2004 Posts: 145
Hi All,
I am trying to do segmentation with a test flow.
made the output queue max message size as 256K and MQOutput node advanced property Segmentation allowed check box checked.
Then I am putting 1 MB message in the input queue and I am expecting 4 messages in the out put queue but I am getting message too big exception.
I tried doing with esql but I am sure I am doing something wrong with offset.
so the second flow trying to join these segments is not joining and giving me only one message i.e last segment message on the output queue of second flow.
MQInput node of second flow is configured as below:
Order mode = default
Logical order = checked the box
All messages available = checked the box
Commit by message group = checked the box
I have gone through many posts here in the forum but I did not find any thing about offset ( how to set and yesterday I saw one post on how to calculate offset in sudo code but when I searching again I am not getting)
below is the code I am using and I commented offset statements.
Can some one through some light on offset or what I am missing in the first scenario when I am asking Queue Manager to do segmentation.
Code:
DECLARE MSGNUM INT 0;
DECLARE datalen INT 0;
DECLARE offset INT 0;
DECLARE MSGTOTAL INT 5;
WHILE MSGNUM < MSGTOTAL DO
SET MSGNUM = MSGNUM + 1;
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.GroupId = X'000000000000000000000000000000000000000000000001';
SET OutputRoot.MQMD.MsgSeqNumber = MSGNUM;
SET OutputRoot.MQMD.MsgFlags = MQMF_SEGMENT;-- MQMF_MSG_IN_GROUP;--
-- SET offset=offset+datalen;
-- SET datalen=1381;
-- SET OutputRoot.MQMD.Offset = offset;
IF (MSGNUM = MSGTOTAL) THEN
SET OutputRoot.MQMD.MsgFlags = MQMF_LAST_SEGMENT;--MQMF_LAST_MSG_IN_GROUP; --
END IF;
SET OutputRoot.BLOB.BLOB = InputRoot.BLOB.BLOB;
PROPAGATE DELETE NONE;
END WHILE;
RETURN FALSE;
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