Try OpenEdge Now
skip to main content
Messaging and ESB
Implementing Messaging : Consuming messages : Message-reception issues : Message Consumer scope
 
Message Consumer scope
A Message Consumer object can be used to handle only one subscription (in the Pub/Sub domain) or receive messages from only one queue (in the PTP domain).
When the deleteConsumer procedure is called, message reception is canceled and the Message Consumer object is deleted.
Note: To delete a durable subscription (in the Pub/Sub domain), the cancelDurableSubscription procedure in pubsubsession.p or jmssession.p must be called as well, since deleteConsumer procedure only suspends the subscription in the current session. There is no equivalent to a durable subscription in the PTP domain. It is an error to call the cancelDurableSubscription procedure while there is an active Message Consumer for that subscription. First call the deleteConsumer procedure to delete the Message Consumer.
When a Message Consumer object is used for receiving replies through the requestReplyprocedure call, it can be used many times; there is no need to create one for every call. The deleteSessionprocedure call deletes all Message Consumer objects for that session.