Page MenuHomePhabricator

Confluent kafka python with SSL and hostname verification

Authored By
dcausse
Sep 28 2021, 8:49 AM
Size
451 B
Referenced Files
None
Subscribers
None

Confluent kafka python with SSL and hostname verification

from confluent_kafka import Consumer
c = Consumer({
'bootstrap.servers': 'SSL://kafka-main1002.eqiad.wmnet:9093',
'security.protocol': 'SSL',
'group.id': 'test-confluent',
'ssl.endpoint.identification.algorithm': 'HTTPS', # unset by default disabling hostname verification
'ssl.ca.location': '/etc/ssl/certs/ca-certificates.crt' # optional librdkafka seems to load it by default
})
meta = c.list_topics()
print(meta.brokers)

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9190937
Default Alt Text
Confluent kafka python with SSL and hostname verification (451 B)

Event Timeline