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.