userver: samples/kafka_service/src/produce.hpp
Loading...
Searching...
No Matches
samples/kafka_service/src/produce.hpp
#pragma once
#include <string>
#include <userver/kafka/producer.hpp>
namespace kafka_sample {
enum class SendStatus {
kSuccess,
kErrorRetryable,
kErrorNonRetryable,
};
struct RequestMessage {
std::string topic;
std::string key;
std::string payload;
};
SendStatus Produce(const kafka::Producer& producer, const RequestMessage& message);
} // namespace kafka_sample