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 for Direct messages that are received.
- An event handling callback for events that occur for the session.
| Solace Messaging API | Use |
|---|---|
|
Solace C API |
|
|
Solace JavaScript API and Solace Node.js API |
|
The figure below shows some of the fundamental processing components that are dependent on a session.
Session and its Aggregates