Posted: Mon Sep 15, 2014 3:31 am Post subject: DataPower truncates MQ messages
Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
I have a simple MPGW that uses an MQ front side handler and a dynamic endpoint. The input message is not transformed, an XSL just resolves the dynamic endpoint url from the input queue name.
Messages in the output queue are one byte shorter than the original message. The first byte of the payload is missing.
Someone told me that someone else had told that this is because DP does not handle MQMD as a fixed lenght field. So it expects MQMD to be one byte longer than it actually is? Doesn't sound right.
Can somebody explain what happens and how to avoid it?
The MPGW policy had two rules. The first rule never matched. The output messages were one byte shorter than the input messages and it was the first byte of the payload that was missing.
I deleted the first rule. Now the messages come out intact.
I put the rule back. DP erased the first byte of the payload message.
I added another copy of the non-matching rule. DP erased two first bytes.
My conclusion is that for every rule that is tested before a match is found, the payload message becomes one byte shorter.
The problem was that my match rule was not very well crafted. The infocenter says that you cannot access context variables from a match action, but I wanted to test it anyway. But my XPath was not a conditional expression but an assingment...
That you cannot access context variables from within a match action is only partially true. You cannot read them (because they are not initialized yet), but you can write them. Writing an MQMD header field in a match action has interesting consequences...
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