userver: ydb::TopicReadSession Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ydb::TopicReadSession Class Referencefinal

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

Examples
samples/ydb_service/components/topic_reader.cpp.

Definition at line 32 of file topic.hpp.

Public Member Functions

std::vector< NYdb::NTopic::TReadSessionEvent::TEvent > GetEvents (std::optional< std::size_t > max_events_count={})
 Get read session events.
 
bool Close (std::chrono::milliseconds timeout)
 Close read session.
 
std::shared_ptr< NYdb::NTopic::IReadSession > GetNativeTopicReadSession ()
 

Member Function Documentation

◆ Close()

bool ydb::TopicReadSession::Close ( std::chrono::milliseconds timeout)

Close read session.

Waits for all commit acknowledgments to arrive. Force close after timeout

◆ GetEvents()

std::vector< NYdb::NTopic::TReadSessionEvent::TEvent > ydb::TopicReadSession::GetEvents ( std::optional< std::size_t > max_events_count = {})

Get read session events.

Waits until event occurs

Parameters
max_events_countmaximum events count in batch if not specified, read session chooses event batch size automatically

◆ GetNativeTopicReadSession()

std::shared_ptr< NYdb::NTopic::IReadSession > ydb::TopicReadSession::GetNativeTopicReadSession ( )

Get native read session

Warning
Use with care! Facilities from <core/include/userver/drivers/subscribable_futures.hpp> can help with non-blocking wait operations.

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