Fix crash in the Linux unittest in the HTTP client code, in Socket::readBytes. Cobra Metrics Publisher code returns the message id of the message that got published, to be used to validated that it got sent properly when receiving an ack.

This commit is contained in:
Benjamin Sergeant
2019-09-21 09:23:58 -07:00
parent 8821183aea
commit 1769199d32
14 changed files with 135 additions and 87 deletions

View File

@ -53,7 +53,8 @@ namespace ix
if (!stress)
{
cobraMetricsPublisher.push(channel, data);
auto msgId = cobraMetricsPublisher.push(channel, data);
spdlog::info("Sent message: {}", msgId);
}
else
{

View File

@ -70,11 +70,11 @@ namespace ix
spdlog::info("Publisher authenticated");
authenticated = true;
spdlog::info("Publishing data");
Json::Value channels;
channels[0] = channel;
conn.publish(channels, data);
auto msgId = conn.publish(channels, data);
spdlog::info("Published msg {}", msgId);
}
else if (eventType == ix::CobraConnection_EventType_Subscribed)
{
@ -91,7 +91,7 @@ namespace ix
}
else if (eventType == ix::CobraConnection_EventType_Published)
{
spdlog::info("Published message acked: {}", msgId);
spdlog::info("Published message id {} acked", msgId);
messageAcked = true;
condition.notify_one();
}