Try OpenEdge Now
skip to main content
Messaging and ESB
Understanding the Messaging Models : Using PTP messaging : Receiving messages from a PTP queue

Receiving messages from a PTP queue

The following general steps outline how an OpenEdge application receives a message from a queue:
1. The application obtains a handle to the PTP Session object.
2. The application creates a Message Consumer object by calling the createMessageConsumer procedure.
3. The application calls the receiveFromQueue procedure in the Session object with the name of a queue and the Message Consumer handle as input parameters.
4. The application executes a WAIT–FOR statement (or calls a waitForMessages procedure) and processes incoming messages and other ABL (Advanced Business Language) events.
5. The application deletes the messages after it finishes using them.