Created
January 22, 2023 14:41
-
-
Save merlin-quix/eea21e45d5d6e4d5f2f24bec661402ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
producer = KafkaProducer(bootstrap_servers=['localhost:9092'], | |
value_serializer=lambda x:json.dumps(x,default=str).encode('utf-8'), | |
key_serializer=lambda y:str(y).encode("utf-8")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment