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.
Java RTO, C, and .NET APIs
In the Java RTO, C, and .NET APIs, 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.
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 C and .NET APIs
JavaScript and Node.js APIs
The JavaScript and Node.js APIs are single-threaded including notification and dispatching the acknowledgments to application event listeners.