userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
producer_component.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <string_view>
7
8
#include <
userver/kafka/producer.hpp
>
9
10
#include <
userver/components/component_base.hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
kafka {
15
36
class
ProducerComponent final :
public
components::ComponentBase
{
37
public
:
40
static
constexpr
std::string_view
kName
{
"kafka-producer"
};
41
42
ProducerComponent
(
const
components::ComponentConfig
& config,
const
components::ComponentContext
& context);
43
~ProducerComponent
()
override
;
44
47
const
Producer
&
GetProducer
();
48
49
static
yaml_config::Schema
GetStaticConfigSchema
();
50
51
private
:
52
Producer
producer_;
53
};
54
55
}
// namespace kafka
56
57
USERVER_NAMESPACE_END
userver
kafka
producer_component.hpp
Generated on
for userver by
Doxygen
1.17.0