Salesforce

MSMQ Read Message (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

MSMQ Read Message (Magic xpa 3.x)

The MSMQ Read Message program receives a message, returns the message, and also returns the Datatype. The parameters and return value for the MSMQ Read Message program are:

Parameter

Description

Queue Handle

Numeric (18). The numeric value that was returned from the MSMQ Open Queue program.

Timeout

Numeric (5). Input. (Milliseconds). This is the time that the component waits for a message.
A value of (-1) represents infinite, meaning that the component waits until there is a message in the queue. This is the way to implement a listener.

Transaction Mode

Alpha (1). The valid values are:

  • N: No transaction

  • S: Single message transaction

  • T: Within a defined transaction

Transaction Handle

Numeric (18). Input optional. The numeric value that was returned from the MSMQ Begin Transaction program, which is mandatory when sent within a defined transaction.

Numeric Picture

Alpha (30). Optional input. If the fetched data is numeric, this picture is used. If this is blank, the parameter is not passed, and the global default value is used. This can be overridden as explained in the section on the Setup Numeric Picture Utility.

Message Identifier

Numeric (9). Input optional. If this is passed, the component scans all messages and looks at the AppSpecific property until it finds a message with the property that equals the value passed.

Message LookupId

Alpha (40). Input optional. If this is passed, the component fetches a message answering to the LookupId property.
Note:
This is only available from MSMQ 3.0 and above, that is Windows XP.

Convert Vector to BLOB

Logical (5). This parameter instructs the component to convert an array of bytes to a BLOB. The parameter is only relevant if the received message is an array of bytes. If this is True, a BLOB is returned and the developer can save the BLOB to a file using the Blb2File function.

Message

BLOB. Input. Contains the message data.

Data type

Alpha (1). (Output). The valid values are:

  • A: Alpha

  • N: Numeric

  • D: Date – This is really DateTime, which must be in the format of date space time; for example, 31/12/2002 14:39:46 Note: if the date was not sent, the date portion will probably be 31/12/1899.

  • L: Logical

  • V: Vector, array of bytes. A Magic xpa vector defined as having a numeric cell of 3.

Correlation ID

Vector (array of bytes). Optional input and output. For Send / Reply implementations. A Magic xpa vector that is defined as having a numeric cell of 3 and must be a vector of 20 cells.
For input, only messages with matching Correlation IDs will be sent.

Message ID

Vector (array of bytes). Optional output. a Magic xpa vector defined as having a numeric cell of 3, which results in a vector of 20 cells.

A variable assigned to this parameter will get the Message ID of the message sent.


Return value

Numeric. 0 for success and a negative value for failure

Note:

It is possible to use this program to read messages in an acknowledgement queue. In this case, the acknowledgement message will be returned as the message. This is valid for cases in which the MsgClass property is not zero. In order to match the acknowledgement message with a sending message, you should use the Correlation ID.

Reference
Attachment 
Attachment