From 9e785e3224d6ca0bdc9e0b6b419b65a7c5103111 Mon Sep 17 00:00:00 2001 From: mary-silence <48654527+mary-silence@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:30:58 +0300 Subject: [PATCH] Update reader_example.py --- examples/topic/reader_example.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/topic/reader_example.py b/examples/topic/reader_example.py index ab8157a9..1d161177 100644 --- a/examples/topic/reader_example.py +++ b/examples/topic/reader_example.py @@ -9,6 +9,7 @@ def connect(): credentials=ydb.credentials.AnonymousCredentials(), ) reader = db.topic_client.reader("/local/topic", consumer="consumer") + #use your consumer return reader @@ -108,3 +109,13 @@ def handle_partition_graceful_stop_batch(reader: ydb.TopicReader): def _process(msg): raise NotImplementedError() + +#create new consumer, if you used thise one earlier +#driver.topic_client.alter_topic( +# "/local/topics", +# add_consumers=[ +# ydb.TopicConsumer( +# name="consumer6" +# ) +# ] +#)