Try OpenEdge Now
skip to main content
Messaging and ESB
Programming for the OpenEdge Adapter for SonicMQ with the ABL - JMS API : PTP message example : Preparing to receive messages
 

Preparing to receive messages

The OpenEdge application begins listening on the queue and prepares to receive messages from the queue, as follows:

Preparing to receive messages

RUN receiveFromQueue IN hPTPSession ("myQueue", ?, hConsumer).
RUN startReceiveMessages IN hPTPSession.
/* Wait to receive the messages. */
WAIT-FOR u1 OF THIS-PROCEDURE.
The Message Consumer (hConsumer handle) listens on myqueue and handles messages using the myintproc internal procedure. The startReceiveMessagesprocedure starts receipt of incoming messages.