#include <produce.hpp>
#include <userver/kafka/exceptions.hpp>
namespace kafka_sample {
SendStatus Produce(
const kafka::Producer& producer,
const RequestMessage& message) {
try {
producer.
Send(message.topic, message.key, message.payload);
return SendStatus::kSuccess;
return ex.
IsRetryable() ? SendStatus::kErrorRetryable : SendStatus::kErrorNonRetryable;
}
}
}