Threading When Publishing Messages

When the event broker successfully receives Guaranteed messages, it returns acknowledgments to the API. It does not return acknowledgments for Direct messages.

The context uses a processing thread to read the acknowledgment from the event broker. It then parses the windowed acknowledgment, enqueues separate acknowledgments for each message (identified by a message ID), then dispatches them to an application callback function.

In the Solace C API, a context uses a single thread to read the windowed acknowledgment that the event broker sends for the received Guaranteed messages and parse them. Acknowledgments from the event broker are not placed in a notification queue; rather, the same thread is used for notification and dispatching the queued acknowledgments to an application callback function.

The following figure shows the application thread used to send Guaranteed messages and the context thread used to handle windowed message acknowledgments from the event broker.

Publishing Guaranteed Messages Using the Solace C API

Publishing Message in the C API