libbmq
a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
|
Provide a builder for batching confirmation messages. More...
#include <bmqa_message.h>
#include <bmqt_resultcode.h>
#include <bdlbb_blob.h>
#include <bsls_alignedbuffer.h>
Go to the source code of this file.
Classes | |
class | BloombergLP::bmqa::ConfirmEventBuilder |
Mechanism to build a batch of CONFIRM messages. More... | |
Namespaces | |
BloombergLP | |
BloombergLP::bmqa | |
This component implements a mechanism, bmqa::ConfirmEventBuilder, that can be used for batching CONFIRM messages. The resulting batch can be sent to the BlazingMQ broker using the bmqa::Session (refer to bmqa_session.h for details). Wherever possible, a BlazingMQ consumer should try to send a batch of CONFIRM messages, which is more efficient than confirming messages individually.
The builder holds a batch of CONFIRM messages under construction, and provides two flavors of addMessageConfirmation method to add a CONFIRM message to the batch. It also provides a routine to retrieve number of CONFIRM messages added to the batch. Once application is done creating the batch, it can retrieve the blob (wire-representation) of the batch and send it via bmqa::Session. See the usage section for more details.
This component is NOT thread safe. If it is desired to create a batch of CONFIRM messages from multiple threads, an instance of the builder must be created and maintained per thread.