Solace PubSub+ API Concepts
In this section we'll provide you with an overview of Solace API fundamentals.
The messaging APIs use processing Contexts for organizing communication between an application and a Solace PubSub+ event broker. Contexts act as containers in which Sessions are created and Session-related events can be handled.
A Context encapsulates threads that drive network I/O and message delivery notification for the Sessions and Session components associated with that Context. For Solace JCSMP, one thread is used for I/O and another for notification. For the Java RTO, C, and .NET APIs, a single thread is used for both I/O and for notification. The life cycle of a Context‑owned thread is bound to the life cycle of the Context.
A Session creates a single, client connection to an event broker for sending and receiving messages. Sessions also allow applications to add and remove subscriptions.
A Consumer Flow is an API object that allows applications to receive Guaranteed messages from an endpoint, such as a Queue. It is created by a Solace session.