Рет қаралды 2,881
In this video , 2 very important properties related to kafka producer are covered with in-depth intuition -- buffer.memory & max.block.ms
buffer_memory is the total bytes of memory the producer should use to buffer records waiting to be sent to the server. If records are sent faster than they can be delivered to the server the producer will block up to max_block_ms.
Prerequisite:
--------------------
Install and run Apache Kafka & integration with Python using kafka-python
• Install and run Apache...
Multiple Producer & Multiple Consumer in a Kafka Topic
• Multiple Producer & Mu...
Intuition on Log files in kafka & Kafka Brokers
• Intuition on Log files...
Broker Cluster and Zookeeper in Kafka
• Broker Cluster and Zoo...
Topics, partitions, and offsets in Kafka
• Topics, partitions, an...
Kafka Cluster with Multiple Brokers
• Kafka Cluster with Mul...
Topic with Replication in Multiple Broker Kafka Cluster
• Topic with Replication...
Setting up a single node Kafka Cluster on EC2
• Setting up a single n...
Kafka Log Segments in-depth intuition
• Kafka Log Segments in-...
Kafka Producer Key & Message Acknowledgements
• Kafka Producer Key & M...
Kafka Producer Internals
• Kafka Producer Internals
Kafka Topic Partitions & Producers using Python
• Kafka Topic Partitions...
Code:
-----------
from time import sleep
from json import dumps
from kafka import KafkaProducer
topic_name='hello_world'
producer = KafkaProducer(bootstrap_servers=['localhost:9092'],value_serializer=lambda x: dumps(x).encode('utf-8'))
for e in range(1000):
data = {'number' : e}
print(data)
producer.send(topic_name, value=data)
producer.flush()
producer.close()
Check this playlist for more Data Engineering related videos:
• Demystifying Data Engi...
Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--
doc.clickup.co...
🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY KZbin CHANNEL