Try OpenEdge Now
skip to main content
Messaging and ESB
Understanding the Messaging Models : Using PUB/SUB messaging : Creating a session procedure and connecting to a SonicMQ Broker
 

Creating a session procedure and connecting to a SonicMQ Broker

The following general steps outline how an OpenEdge application connects to a SonicMQ Broker for a Pub/Sub session:
1. The application runs jms/jmssession.p or jms/pubsubsession.p persistently to instantiate the appropriate Session object.
2. The application sets connection parameters for SonicMQ.
3. The application calls the beginSession procedure to connect to the OpenEdge Adapter for SonicMQ and the SonicMQ Broker and starts the JMS session.
4. The application uses the handle of the Session object to create and publish messages to topics and to subscribe to and receive messages from topics.
5. The application calls the deleteSession procedure in the Session object to close the session and the underlying connection.