userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
consumer_component.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <string_view>
7
8
#include <
userver/kafka/consumer_scope.hpp
>
9
10
#include <
userver/components/component_base.hpp
>
11
#include <
userver/utils/fast_pimpl.hpp
>
12
13
USERVER_NAMESPACE_BEGIN
14
15
namespace
kafka {
16
17
namespace
impl {
18
19
class
Consumer;
20
21
}
// namespace impl
22
43
class
ConsumerComponent final :
public
components::ComponentBase
{
44
public
:
47
static
constexpr
std::string_view
kName
{
"kafka-consumer"
};
48
49
ConsumerComponent
(
const
components::ComponentConfig
& config,
const
components::ComponentContext
& context);
50
~ConsumerComponent
()
override
;
51
54
ConsumerScope
GetConsumer
();
55
56
static
yaml_config::Schema
GetStaticConfigSchema
();
57
58
private
:
59
static
constexpr
std::size_t kImplSize = 2480;
60
static
constexpr
std::size_t kImplAlign = 16;
61
utils::FastPimpl<impl::Consumer, kImplSize, kImplAlign>
consumer_;
62
};
63
64
}
// namespace kafka
65
66
USERVER_NAMESPACE_END
userver
kafka
consumer_component.hpp
Generated on
for userver by
Doxygen
1.17.0