The OpenEdge application uses a Message Consumer object to receive messages from a destination or to receive asynchronous error messages. In a Session object, the application creates a Message Consumer object using the createMessageConsumer procedure .

The lifecycle of a Message Consumer object includes these general steps:

  1. An application implements a procedure to handle the messages.
  2. The application creates the Message Consumer, specifying the message-handling procedure.
  3. The application uses the Message Consumer object to do one of the following: subscribe to a topic (Pub/Sub) or receive messages from the queue (PTP); set an error handler and receive error messages asynchronously from the JMS-provider through the Progress OpenEdge JMS Adapter; or receive replies in a request/reply cycle.
  4. After using the Message Consumer object, the application can activate it by getting into a WAIT FOR state (or any IO-blocking state where the application processes events).
  5. When the Message Consumer finishes processing all messages of interest, the application calls the deleteConsumer procedure to release the resources in the OpenEdge application, Progress OpenEdge JMS Adapter, and the JMS-provider Broker.