subscribe procedure
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
subscribe procedure
Subscribes to a topic.
Syntax
|
Parameters
- topicName
- The topic to which the procedure subscribes.
- subscriptionName
- A subscriptionName parameter with a
value other than
UNKNOWNspecifies a durable subscription. Durable subscriptions require that the JMS client have a client ID identifier; the client must callsetClientIDin thepubsubsession.pobject (or set the default client ID on the server side). If the subscriptionName value isUNKNOWN, the subscription is not durable. - messageSelector
- A message selector (optional).
- noLocalPublications
- A Boolean flag controlling whether the application receives
its own messages (optional). The default is
FALSE(the session receives its own publications). - messageConsumer
- The Message Consumer object.
Applies to
Session objects
Notes
- The messages are handled asynchronously by the messageConsumer object.
- If the subscriptionName value is
UNKNOWNor an empty string, the subscription is not durable. - Durable subscriptions require the JMS client to have a client ID identifier.
- The client must call setClientID procedure in
the
pubsubsessionobject (or set the default client ID on the server side) if a durable subscription is desired. The default of noLocalPublications isFALSE. The session, by default, get its own publications. - This procedure executes remotely on the Progress OpenEdge JMS Adapter.
See also
cancelDurableSubscription procedure, publish procedure, subscribe procedure
For more information, see the Publishing messages to a topic, the Subscribing to a topic, the Durable subscriptions, and the Methods unique to Pub/Sub messaging.
For an example, see the Pub/Sub messaging example.