Closed
Description
According to documentation:
https://kafka-python.readthedocs.io/en/master/apidoc/KafkaConsumer.html
https://kafka-python.readthedocs.io/en/master/apidoc/ClusterMetadata.html
partitions_for_topic
method return type is set
. However, if the topic does not exists, ClusterMetadata
's method returns None
(and thus KafkaConsumer
's, which calls ClusterMetadata
's partitions_for_topic
for that topic).
Notice that the solution should either update the documentation (explictly stating that the method may return None
, its type is Optional[set]
) or even better, just returning an empty set
if the topic is not found.
Metadata
Metadata
Assignees
Labels
No labels