#include <userver/ydb/topic_writer.hpp>
Settings for TopicWriter.
Definition at line 29 of file topic_writer.hpp.
Public Types | |
| enum class | StatisticLevel { kWriter , kWorker } |
| Level of the statistics provided to monitoring. More... | |
Public Attributes | |
| std::shared_ptr< ydb::TopicClient > | topic_client |
| std::string | topic_name |
| Topic name to write messages into. | |
| std::size_t | workers_num {1} |
| std::size_t | max_incoming_msg_queue_size {100} |
| std::size_t | max_ydb_control_event_queue_size {10} |
| StatisticLevel | stats_level {StatisticLevel::kWriter} |
| Desired level for collected statistics. | |
Static Public Attributes | |
| static constexpr std::size_t | kMaxWorkers = 100 |
| Maximum number of workers allowed per topic writer. | |
|
strong |
Level of the statistics provided to monitoring.
| Enumerator | |
|---|---|
| kWriter | Consolidated stats for whole topic writer (sum of stats for all workers within this writer) |
| kWorker | Stats for all workers individually. |
Definition at line 34 of file topic_writer.hpp.
|
staticconstexpr |
Maximum number of workers allowed per topic writer.
Definition at line 31 of file topic_writer.hpp.
| std::size_t ydb::TopicWriterSettings::max_incoming_msg_queue_size {100} |
Maximum number of messages that can be buffered in the incoming queue before WriteMessage starts returning kResourceExhausted
Definition at line 53 of file topic_writer.hpp.
| std::size_t ydb::TopicWriterSettings::max_ydb_control_event_queue_size {10} |
Maximum number of control events from YDB that can be buffered before the worker stops reading new events from the session
Definition at line 56 of file topic_writer.hpp.
| StatisticLevel ydb::TopicWriterSettings::stats_level {StatisticLevel::kWriter} |
Desired level for collected statistics.
Definition at line 59 of file topic_writer.hpp.
| std::shared_ptr<ydb::TopicClient> ydb::TopicWriterSettings::topic_client |
Topic client for communication with YDB. Note that TopicClient is a client to the topic service, not a client to a specific topic.
Definition at line 44 of file topic_writer.hpp.
| std::string ydb::TopicWriterSettings::topic_name |
Topic name to write messages into.
Definition at line 46 of file topic_writer.hpp.
| std::size_t ydb::TopicWriterSettings::workers_num {1} |
Number of workers used to write messages into the topic. Messages are distributed across workers in round-robin fashion. Increasing this value improves throughput but does not preserve message ordering.
Definition at line 50 of file topic_writer.hpp.