mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Fix
This commit is contained in:
parent
8cfd544328
commit
ddf2af598d
@ -61,12 +61,13 @@ void RabbitMQConsumer::subscribe()
|
|||||||
{
|
{
|
||||||
String message_received = std::string(message.body(), message.body() + message.bodySize());
|
String message_received = std::string(message.body(), message.body() + message.bodySize());
|
||||||
|
|
||||||
|
std::unique_lock lock(mutex);
|
||||||
|
|
||||||
if (!received.push({message_received, message.hasMessageID() ? message.messageID() : "",
|
if (!received.push({message_received, message.hasMessageID() ? message.messageID() : "",
|
||||||
message.hasTimestamp() ? message.timestamp() : 0,
|
message.hasTimestamp() ? message.timestamp() : 0,
|
||||||
redelivered, AckTracker(delivery_tag, channel_id)}))
|
redelivered, AckTracker(delivery_tag, channel_id)}))
|
||||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Could not push to received queue");
|
throw Exception(ErrorCodes::LOGICAL_ERROR, "Could not push to received queue");
|
||||||
|
|
||||||
std::unique_lock lock(mutex);
|
|
||||||
cv.notify_one();
|
cv.notify_one();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user