7#include <ydb-cpp-sdk/client/topic/topic.h>
18class TopicReadSession
final {
22 explicit TopicReadSession(
23 std::shared_ptr<NYdb::NTopic::IReadSession> read_session);
26 std::vector<NYdb::NTopic::TReadSessionEvent::TEvent> GetEvents(
27 std::optional<std::size_t> max_events_count = {});
29 bool Close(std::chrono::milliseconds timeout);
31 std::shared_ptr<NYdb::NTopic::IReadSession> GetNativeTopicReadSession();
34 std::shared_ptr<NYdb::NTopic::IReadSession> read_session_;
37class TopicClient
final {
41 TopicClient(std::shared_ptr<impl::Driver> driver,
42 impl::TopicSettings settings);
47 void AlterTopic(
const std::string& path,
48 const NYdb::NTopic::TAlterTopicSettings& settings);
50 NYdb::NTopic::TDescribeTopicResult DescribeTopic(
const std::string& path);
52 TopicReadSession CreateReadSession(
53 const NYdb::NTopic::TReadSessionSettings& settings);
55 NYdb::NTopic::TTopicClient& GetNativeTopicClient();
58 std::shared_ptr<impl::Driver> driver_;
59 NYdb::NTopic::TTopicClient topic_client_;