Skip to content

Commit 33e49c0

Browse files
Add SASL mechanism setting (currently only PLAIN)
1 parent 424e3ed commit 33e49c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def produce_msgs(security_protocol='SSL',
5555
producer = KafkaProducer(
5656
bootstrap_servers=hostname + ':' + port,
5757
security_protocol='SASL_SSL',
58+
sasl_mechanism='PLAIN',
5859
sasl_plain_username=username,
5960
sasl_plain_password=password,
6061
value_serializer=lambda v: json.dumps(v).encode('ascii'),

0 commit comments

Comments
 (0)