Skip to content

KafkaConsumer class doesn't work with security_protocol as a SASL_PLAINTEXT  #1935

@fedotarte

Description

@fedotarte

if you create a KafkaConsumer with SASL auth parameters like that:

            consumer = KafkaConsumer(bootstrap_servers=str_broker_host,
                                security_protocol='SASL_PLAINTEXT',
                                sasl_mechanism='PLAIN',
                                sasl_plain_username='user',
                                sasl_plain_password='password')

it won't work with error Errors.NoBrokersAvailable()

i need it to get topic sizes:

# topic name and partition
end_offset = consumer.end_offsets([TopicPartition(topic[0], 0)])

Also i checked the class KafkaConsumer, and there is no value "SASL_PLAINTEXT" for security_protocol.

How can i get the topic size for 0 partition without calling the KafkaConsumer?

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions