Try OpenEdge Now
skip to main content
Messaging and ESB
ABL - JMS API Reference : publish procedure
 

publish procedure

Publishes a message to a topic.

Syntax

PROCEDURE publish.
DEFINE INPUT PARAMETER topicName AS CHARACTER.
DEFINE INPUT PARAMETER message AS HANDLE.
DEFINE INPUT PARAMETER priority AS INTEGER.
DEFINE INPUT PARAMETER timeToLive AS DECIMAL.
DEFINE INPUT PARAMETER deliveryMode AS CHARACTER.

Parameters

topicName
The topic to which the message is published.
message
The Message object.
priority
The message priority (optional): 0–9. Session default is used if UNKNOWN.
timeToLive
Time to live, in milliseconds (optional). Session default is used if UNKNOWN.
deliveryMode
The delivery mode (optional): PERSISTENT, NON_PERSISTENT, NON_PERSISTENT_ASYNC, DISCARDABLE, or UNKNOWN (?). Session default is used if UNKNOWN.

Applies to

Session objects

Notes

*If the publication is in reply to a received message, topicName can be the ReplyTo field obtained from the original message.
*This procedure executes remotely (sends a message to the OpenEdge Adapter for SonicMQ).

See also

cancelDurableSubscription procedure, publishprocedure, subscribeprocedure
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.