5#include <userver/engine/task/task_processor_fwd.hpp>
6#include <userver/engine/task/task_with_result.hpp>
7#include <userver/kafka/exceptions.hpp>
8#include <userver/utils/fast_pimpl.hpp>
9#include <userver/utils/statistics/writer.hpp>
11USERVER_NAMESPACE_BEGIN
20struct ProducerConfiguration;
53 const std::string& name,
54 engine::TaskProcessor& producer_task_processor,
55 const impl::ProducerConfiguration& configuration,
56 const impl::Secret& secrets
65 Producer(
const Producer&) =
delete;
66 Producer(Producer&&) =
delete;
68 Producer& operator=(
const Producer&) =
delete;
69 Producer& operator=(Producer&&) =
delete;
95 const std::string& topic_name,
97 std::string_view message,
98 std::optional<std::uint32_t> partition =
std::
nullopt
111 std::string topic_name,
114 std::optional<std::uint32_t> partition =
std::
nullopt
124 const std::string& topic_name,
125 std::string_view key,
126 std::string_view message,
127 std::optional<std::uint32_t> partition
131 const std::string name_;
132 engine::TaskProcessor& producer_task_processor_;
134 static constexpr std::size_t kImplSize{944};
135 static constexpr std::size_t kImplAlign{16};
136 utils::FastPimpl<impl::ProducerImpl, kImplSize, kImplAlign> producer_;