(cobra client and bots) add batch_size subscription option for retrieving multiple messages at once
This commit is contained in:
@@ -125,10 +125,12 @@ namespace
|
||||
{
|
||||
std::string filter;
|
||||
std::string position("$");
|
||||
int batchSize = 1;
|
||||
|
||||
_conn.subscribe(channel,
|
||||
filter,
|
||||
position,
|
||||
batchSize,
|
||||
[this](const Json::Value& msg, const std::string& /*position*/) {
|
||||
spdlog::info("receive {}", msg.toStyledString());
|
||||
|
||||
|
@@ -76,10 +76,12 @@ namespace
|
||||
log("Subscriber authenticated");
|
||||
std::string filter;
|
||||
std::string position("$");
|
||||
int batchSize = 1;
|
||||
|
||||
conn.subscribe(channel,
|
||||
filter,
|
||||
position,
|
||||
batchSize,
|
||||
[](const Json::Value& msg, const std::string& /*position*/) {
|
||||
log(msg.toStyledString());
|
||||
|
||||
|
Reference in New Issue
Block a user