-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
Hi
I write a simple sender script reading a file and send to kafka 0.8.1 line by line when it is send to EOF but can't exit ! Actually this script is hang on ..
producer = SimpleProducer(client, async=True,
req_acks=SimpleProducer.ACK_AFTER_LOCAL_WRITE,
ack_timeout=2000,
batch_send=True)
for line in open(file_name,'r').readlines():
producer.send_messages("topic.default.2",line)
producer.stop()
client.close()
Somebody could help me ? thanks a lot ~