userver: ydb::FederatedTopicReadSession Class Reference
Loading...
Searching...
No Matches
ydb::FederatedTopicReadSession Class Referencefinal

Detailed Description

Public Member Functions

std::vector< NYdb::NFederatedTopic::TReadSessionEvent::TEvent > GetEvents (std::optional< std::size_t > max_events_count={}, size_t max_size_bytes=std::numeric_limits< size_t >::max())
 Get read session events.
 
bool Close (std::chrono::milliseconds timeout)
 Close read session.
 
NYdb::NFederatedTopic::IFederatedReadSession & GetNativeTopicReadSession ()
 Get native read session.
 

Member Function Documentation

◆ Close()

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

Close read session.

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

◆ GetEvents()

std::vector< NYdb::NFederatedTopic::TReadSessionEvent::TEvent > ydb::FederatedTopicReadSession::GetEvents ( std::optional< std::size_t > max_events_count = {},
size_t max_size_bytes = std::numeric_limits< size_t >::max() )

Get read session events.

Waits until event occurs

Parameters
max_events_countmaximum events count in batch
max_size_bytestotal size limit for data messages in batch if not specified, read session chooses event batch size automatically

◆ GetNativeTopicReadSession()

NYdb::NFederatedTopic::IFederatedReadSession & ydb::FederatedTopicReadSession::GetNativeTopicReadSession ( )

Get native read session.

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

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