Skip to content

Commit 9e785e3

Browse files
authored
Update reader_example.py
1 parent 647bb2b commit 9e785e3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/topic/reader_example.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def connect():
99
credentials=ydb.credentials.AnonymousCredentials(),
1010
)
1111
reader = db.topic_client.reader("/local/topic", consumer="consumer")
12+
#use your consumer
1213
return reader
1314

1415

@@ -108,3 +109,13 @@ def handle_partition_graceful_stop_batch(reader: ydb.TopicReader):
108109

109110
def _process(msg):
110111
raise NotImplementedError()
112+
113+
#create new consumer, if you used thise one earlier
114+
#driver.topic_client.alter_topic(
115+
# "/local/topics",
116+
# add_consumers=[
117+
# ydb.TopicConsumer(
118+
# name="consumer6"
119+
# )
120+
# ]
121+
#)

0 commit comments

Comments
 (0)