To actually start receiving messages, the OpenEdge application must call the
startReceiveMessagesprocedure in the Session object. One call to the startReceiveMessages procedure is sufficient for the session. The application typically calls the startReceiveMessages procedure after subscribing to all topics of interest (in the Pub/Sub domain) or registering Message Consumer objects with the queues of interest (in the PTP domain).
The application can also call the
stopReceiveMessagesprocedure to temporarily stop the reception of messages. To resume message reception, it can call the startReceiveMessages procedure again.
In the Pub/Sub domain, calling the stopReceiveMessages procedure does not cancel existing subscriptions; however, for any nondurable subscription, messages published while reception is stopped are not delivered.
In the PTP domain, the messages are queued while the client is in the stopReceiveMessages procedure state and are delivered to the client after the startReceiveMessages procedure is called again.
Stopping the reception of messages is recommended when an application is not going to process messages for a while.