Sessions
When a context is established, one or more sessions can be created within that context. A session creates a single, client connection to an event broker for sending and receiving messages.
A session provides the following primary services:
- client connection
- update and retrieve session properties
- retrieve session statistics
- add and remove subscriptions
- create destinations and endpoints
- publish and receive Direct messages
- publish Guaranteed messages
- make requests/replies
- create Guaranteed message flows to receive Guaranteed messages
- create cache sessions
When configuring a session, the following must be provided:
- Session properties to define the operating characteristics of the client connection to the event broker.
- A message callback function for Direct messages that are received.
- An event handling callback function for events that occur for the session.
The Solace C API provides the following for sessions:
solClient_opaqueSession_pt- Session pointer typesolClient_session_create(...)- Function to create a session
The figure below shows some of the fundamental processing components that are dependent on a session.
Session and its Aggregates