Consultor Eletrônico



Kbase P97920: 4GL-JMS: How to extract the exception part of a Multipart SonicMQ Rejected Message
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/17/2006
Status: Unverified

GOAL:

How to extract the exception part of a Multipart SonicMQ Rejected Message

GOAL:

How to obtain the exception part of a Multipart SonicMQ Rejected Message

FACT(s) (Environment):

SonicXQ
SonicMQ
Progress 9.1x
OpenEdge 10.x

FIX:

SonicMQ RME messages are multipart messages that have two parts. The first part is a text part that provides the error message explaining why the message was rejected. The second part is the SonicMQ message part that contains the actual message that was rejected.
In order to extract the exception from the first part the client should be coded to use the getBytesPartByIndex method. The reason for using this instead of getTextPartByIndex is that normally the text part is larger than the 32K limit imposed on the getTextPartByIndex method.
When using the getBytesPartByIndex method you need to provide the output parameter as memptr so that you can use GET-STRING function to retrieve the text. For example:
DYNAMIC-FUNCTION ("getBytesPartByIndex" IN messageH, INPUT 1, OUTPUT hPart as memptr).