userver: ydb::TopicWriterSettings Struct Reference
Loading...
Searching...
No Matches
ydb::TopicWriterSettings Struct Reference

#include <userver/ydb/topic_writer.hpp>

Detailed Description

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::TopicClienttopic_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.
 

Member Enumeration Documentation

◆ StatisticLevel

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.

Member Data Documentation

◆ kMaxWorkers

std::size_t ydb::TopicWriterSettings::kMaxWorkers = 100
staticconstexpr

Maximum number of workers allowed per topic writer.

Definition at line 31 of file topic_writer.hpp.

◆ max_incoming_msg_queue_size

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.

◆ max_ydb_control_event_queue_size

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.

◆ stats_level

StatisticLevel ydb::TopicWriterSettings::stats_level {StatisticLevel::kWriter}

Desired level for collected statistics.

Definition at line 59 of file topic_writer.hpp.

◆ topic_client

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.

◆ topic_name

std::string ydb::TopicWriterSettings::topic_name

Topic name to write messages into.

Definition at line 46 of file topic_writer.hpp.

◆ workers_num

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.


The documentation for this struct was generated from the following file: