You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1928,6 +1928,32 @@ Reading progress is usually saved on a server for each Consumer. However, such p
1928
1928
}
1929
1929
```
1930
1930
1931
+
- Python
1932
+
1933
+
To read without a `Consumer`, create a reader using the `reader` method with specifying these arguments:
1934
+
*`topic`-`ydb.TopicReaderSelector`objectwith defined `path`and`partitions`list;
1935
+
*`consumer`- should be `None`;
1936
+
*`event_handler`- inheritor of `ydb.TopicReaderEvents.EventHandler` that implements the `on_partition_get_start_offset` function. This function is responsible for returning the initial offset for reading messages when the reader starts and during reconnections. The client application must specify this offset in the parameter `ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse.start_offset`. The function can also be implemented as asynchronous.
1937
+
1938
+
Example:
1939
+
1940
+
```python
1941
+
class CustomEventHandler(ydb.TopicReaderEvents.EventHandler):
Для чтения без Consumer'а следует создать читателя с помощью метода `reader` с указанием следующих аргументов:
1937
+
* `topic` - объект `ydb.TopicReaderSelector` с указанными `path` и списком `partitions`;
1938
+
* `consumer` - должен быть `None`;
1939
+
* `event_handler` - наследник `ydb.TopicReaderEvents.EventHandler`, который реализует функцию `on_partition_get_start_offset`. Эта функция отвечает за возвращение начального смещения (offset) для чтения сообщений при старте читателя, а также во время переподключений. Клиентское приложение должно указать это смещение в параметре `ydb.TopicReaderEvents.OnPartitionGetStartOffsetResponse.start_offset`. Также функция может быть реализована как асинхронная.
1940
+
1941
+
Пример:
1942
+
1943
+
```python
1944
+
class CustomEventHandler(ydb.TopicReaderEvents.EventHandler):
0 commit comments