#encoding=utf-8
from kafka import KafkaClient, KafkaProducer, KafkaConsumer

# 给kafka集群发送数据,生产者
cluster_host = '172.31.11.221:9092,172.31.11.222:9092,172.31.11.223:9092'
topic = 'test_topic'
group_id = 'test-python-test_topic'
producter = KafkaProducer(bootstrap_servers=cluster_host)
producter.send(topic=topic, value='from shoujunw test ... ')
producter.flush()

7fabf8240dcacb728f45fa30c16f1d86b565d56c
<mask token>

<mask token>
producter.send(topic=topic, value='from shoujunw test ... ')
producter.flush()

<mask token>
cluster_host = '172.31.11.221:9092,172.31.11.222:9092,172.31.11.223:9092'
topic = 'test_topic'
group_id = 'test-python-test_topic'
producter = KafkaProducer(bootstrap_servers=cluster_host)
producter.send(topic=topic, value='from shoujunw test ... ')
producter.flush()

from kafka import KafkaClient, KafkaProducer, KafkaConsumer
cluster_host = '172.31.11.221:9092,172.31.11.222:9092,172.31.11.223:9092'
topic = 'test_topic'
group_id = 'test-python-test_topic'
producter = KafkaProducer(bootstrap_servers=cluster_host)
producter.send(topic=topic, value='from shoujunw test ... ')
producter.flush()

#encoding=utf-8
from kafka import KafkaClient, KafkaProducer, KafkaConsumer

# 给kafka集群发送数据,生产者
cluster_host = '172.31.11.221:9092,172.31.11.222:9092,172.31.11.223:9092'
topic = 'test_topic'
group_id = 'test-python-test_topic'
producter = KafkaProducer(bootstrap_servers=cluster_host)
producter.send(topic=topic, value='from shoujunw test ... ')
producter.flush()
