5.28.5 RECEIVE
The RECEIVE command is used to receive a message and optionally save the contents to a file.
To receive JMS message properties from the message use the optional working list argument.
The first column receives the property type, the second column receives the property name and the third column receives the property value. The property type is always S (String) for user-defined properties and J for special JMS properties.
If the received message is a TextMessage then the encoding value is used to covert the Unicode content into a byte content to be saved to the specified file.
The message identifier (MessageID) is returned in the JSMMSG field.
Syntax:
Command |
Keyword |
Value |
Developer notes for Command/Keyword/Value |
RECEIVE |
FILE |
value |
Optional. File path. |
ENCODING |
value |
Conditional. Used if received message is a Unicode TextMessage. |
|
WAITTIME |
value. |
Optional. Wait time in milliseconds. |
|
SELECTOR |
value |
Optional. Message Selector. |
|
ARCHIVE |
value |
Optional. Archive file. |
Example
RECEIVE ENCODING(UTF-8) FILE(order.xml) SERVICE_LIST(PRPTYP,PRPNME,PRPVAL)