Receives the first message from the given destination and returns the message type.
Jms.bdh
JmsReceiveMessage( sJndiDestinationName : string, lTimeout : number, sMeasureName : string optional ): number;
Parameter | Description |
---|---|
sJndiDestinationName | The source of the message |
ITimeout | The timeout value (in milliseconds). < 0 - wait forever, 0 - do not wait, > 0 - wait specified milliseconds |
sMeasureName | (optional) The name of this measure. Default is the method name. |
transaction TExampleSendReceiveTextMessage var sRet : number; sMessage : string; begin JmsSendTextMessage("Welcome1!", csQueue); sRet := JmsReceiveMessage(csQueue, -1); if (sRet = JMS_MSG_TYPE_TEXT) then sMessage := JmsGetMessageText(); else RepMessage("TextMessage expected!", SEVERITY_ERROR); end; end TExampleSendReceiveTextMessage;
JmsSample.bdf, JmsSample.java