Public Member Functions | |
ReliableTopicConfig (const char *topicName) | |
const std::string & | getName () const |
Gets the name of the reliable topic. More... | |
int | getReadBatchSize () const |
Gets the maximum number of items to read in a batch. More... | |
ReliableTopicConfig & | setReadBatchSize (int batchSize) |
Sets the read batch size. More... | |
Static Public Attributes | |
static const int | DEFAULT_READ_BATCH_SIZE = 10 |
const std::string & hazelcast::client::config::ReliableTopicConfig::getName | ( | ) | const |
Gets the name of the reliable topic.
int hazelcast::client::config::ReliableTopicConfig::getReadBatchSize | ( | ) | const |
Gets the maximum number of items to read in a batch.
Returned value will always be equal or larger than 1.
ReliableTopicConfig & hazelcast::client::config::ReliableTopicConfig::setReadBatchSize | ( | int | batchSize | ) |
Sets the read batch size.
The ReliableTopic tries to read a batch of messages from the ringbuffer. It will get at least one, but if there are more available, then it will try to get more to increase throughput. The minimal read batch size can be influenced using the read batch size.
If the readBatchSize is 10 and there are 50 messages available, 10 items are retrieved and processed consecutively.
If the readBatchSize is 10 and there are 2 items available, 2 items are retrieved and processed consecutively.
readBatchSize | the maximum number of items to read in a batch. |
IllegalArgumentException | if readBatchSize is smaller than 1. |