Re: Lost message with Kafka configuration

2017-01-06 Thread Hoang Bao Thien
It's perfect with the retries>0. Thanks a lot, James. Best regards On Thu, Jan 5, 2017 at 10:51 PM, James Cheng wrote: > > > On Jan 5, 2017, at 8:23 AM, Hoang Bao Thien > wrote: > > > > Yes, the problem is from producer configuration. And James Cheng has told > > me how to fix it. > > However

Re: Lost message with Kafka configuration

2017-01-05 Thread James Cheng
> On Jan 5, 2017, at 8:23 AM, Hoang Bao Thien wrote: > > Yes, the problem is from producer configuration. And James Cheng has told > me how to fix it. > However I still get other poblem with a large file: > > org.apache.kafka.common.errors.TimeoutException: Batch containing 36 > record(s) expir

Re: Lost message with Kafka configuration

2017-01-05 Thread Hoang Bao Thien
Yes, the problem is from producer configuration. And James Cheng has told me how to fix it. However I still get other poblem with a large file: org.apache.kafka.common.errors.TimeoutException: Batch containing 36 record(s) expired due to timeout while requesting metadata from brokers for MyTopic-0

Re: Lost message with Kafka configuration

2017-01-05 Thread Protoss Hu
You mean the messages were lost on the way to broker before the broker actually received? Protoss Hu Blog: http://hbprotoss.github.io/ Weibo: http://weibo.com/hbprotoss 2017年1月5日 +0800 PM4:53 James Cheng ,写道: > kafka-console-producer.sh defaults to acks=0, which means that the producer > essent

Re: Lost message with Kafka configuration

2017-01-05 Thread Hoang Bao Thien
Hi James et all, Thanks for your help. It works well when that parameter, but only for one CSV file. If I run >=5 CSV files, each of size 110MB, the data is lost too (when I check the number of received messages and the number of messages of original files) I get many lots of errors after re-runni

Re: Lost message with Kafka configuration

2017-01-05 Thread James Cheng
kafka-console-producer.sh defaults to acks=0, which means that the producer essentially throws messages at the broker and doesn't wait/retry to make sure they are properly received. In the kafka-console-producer.sh usage text: --request-required-acksrequests (default: 0) Try

Lost message with Kafka configuration

2017-01-04 Thread Hoang Bao Thien
Hi all, I have a problem with losing messages from Kafka. The situation is as follows: I put a csv file with 286701 rows (size = 110MB) into Kafka producer with command: $ cat test.csv | kafka-console-producer.sh --broker-list localhost:9092 --topic MyTopic > /dev/null and then count the number