#include <userver/ydb/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 () |
bool ydb::TopicReadSession::Close | ( | std::chrono::milliseconds | timeout | ) |
Close read session.
Waits for all commit acknowledgments to arrive. Force close after timeout
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
max_events_count | maximum events count in batch if not specified, read session chooses event batch size automatically |
std::shared_ptr< NYdb::NTopic::IReadSession > ydb::TopicReadSession::GetNativeTopicReadSession | ( | ) |
Get native read session
<core/include/userver/drivers/subscribable_futures.hpp>
can help with non-blocking wait operations.