Handling Session Events

Session events provide information about the state of a client connection to the event broker, including connection establishment, disconnection, and error conditions. Properly handling these events allows your application to respond appropriately to changes in connection status and maintain robust messaging operations.

When a session is created, the application must provide a session event callback (solClient_session_eventCallbackInfoFunc_t), along with an optional pointer to client data. This callback function is invoked for event broker events that occur for the session, such as connection problems, or publish or subscription issues.

For a complete list of possible session events, see the Solace C API reference.

Related Samples

For an example of how to configure a session event callback for the Solace C API, see the common.c sample file.