Skip to content

Commit

Permalink
Update consumer.rst documentation for correct ordering of consumer su…
Browse files Browse the repository at this point in the history
…bscription by pattern (#901)
  • Loading branch information
wbarnha authored Dec 9, 2023
1 parent bc14e6d commit b1a3dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/consumer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ new topic matching a *subscribed regex* is created. For example::
bootstrap_servers='localhost:9092',
metadata_max_age_ms=30000, # This controls the polling interval
)
await consumer.start()
consumer.subscribe(pattern="^MyGreatTopic-.*$")
await consumer.start()

async for msg in consumer: # Will detect metadata changes
print("Consumed msg %s %s %s" % (msg.topic, msg.partition, msg.value))
Expand Down

0 comments on commit b1a3dfc

Please sign in to comment.