(cobra client) can subscribe with a position

This commit is contained in:
Benjamin Sergeant
2020-03-13 16:06:13 -07:00
parent 332ffb0603
commit 9801ebdb36
16 changed files with 48 additions and 14 deletions

View File

@ -93,8 +93,10 @@ namespace
{
log("Subscriber authenticated");
std::string filter;
std::string position("$");
conn.subscribe(
CHANNEL, filter, [](const Json::Value& msg, const std::string& /*position*/) {
CHANNEL, filter, position, [](const Json::Value& msg, const std::string& /*position*/) {
log(msg.toStyledString());
std::string id = msg["id"].asString();