36class TopicReadSession
final {
40 explicit TopicReadSession(std::shared_ptr<NYdb::NTopic::IReadSession> read_session);
50 std::optional<std::size_t> max_events_count = {},
51 size_t max_size_bytes = std::numeric_limits<size_t>::max()
59 const NYdb::NTopic::TReadSessionGetEventSettings& settings
66 bool Close(std::chrono::milliseconds timeout);
75 std::shared_ptr<NYdb::NTopic::IReadSession> read_session_;
81class TopicWriteSession
final {
85 explicit TopicWriteSession(std::shared_ptr<NYdb::NTopic::IWriteSession> write_session);
91 NYdb::NTopic::TWriteSessionEvent::TEvent
GetEvent();
99 std::optional<NYdb::NTopic::TWriteSessionEvent::TEvent>
TryGetEvent();
104 void Write(NYdb::NTopic::TContinuationToken&& token, NYdb::NTopic::TWriteMessage&& message);
110 bool Close(std::chrono::milliseconds timeout);
119 std::shared_ptr<NYdb::NTopic::IWriteSession> write_session_;
127class TopicClient
final {
131 TopicClient(std::shared_ptr<impl::Driver> driver, impl::TopicSettings settings);
137 void AlterTopic(
const std::string& path,
const NYdb::NTopic::TAlterTopicSettings& settings);
155 std::shared_ptr<impl::Driver> driver_;
160 NYdb::IExecutor::TPtr compression_executor_;
161 NYdb::IExecutor::TPtr handlers_executor_;
163 std::optional<NYdb::NTopic::TTopicClient> topic_client_;