Last active
January 22, 2023 14:56
-
-
Save merlin-quix/44add083a4fb0c5b5c4b016ed5000f97 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_compression = 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"), | |
compression_type="gzip", | |
linger_ms=1000, | |
batch_size=10485760) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment