userver: samples/kafka_service/src/consume.cpp
Loading...
Searching...
No Matches
samples/kafka_service/src/consume.cpp
#include <consume.hpp>
namespace kafka_sample {
void Consume(kafka::MessageBatchView messages) {
for (const auto& message : messages) {
if (!message.GetTimestamp().has_value()) {
continue;
}
TESTPOINT("message_consumed", [&message] {
builder["key"] = message.GetKey();
return builder.ExtractValue();
}());
}
}
} // namespace kafka_sample