Re: message order problem

2015-11-25 Thread Muqtafi Akhmad
This behavior might be expected, quoting description in apache kafka documentation here Kafka only provides a total order over messages within a partition, not > between different partitions in a topic. Per-partition ordering combined > with the ability

Re: message order problem

2015-11-24 Thread Guozhang Wang
With ack=1, if your code is does sth. like: producer1.send(msg1).get() // get() blocks until a response is received. producer2.send(msg2).get() // get() blocks until a response is received. Then the ordering is guaranteed though under a broker failure the acked messages may be lost if they have n

Re: message order problem

2015-11-23 Thread Yonghui Zhao
Thanks Guozhang, Most params are not set in our config . So max retries should be 3 by default In your explanation: a. msg1 sent, produce() returned. b. msg2 sent. c. msg1 failed, and retried. d. msg2 acked. e. msg1 acked. But is acks is 0, "the retries configuration will not take effect (as

Re: message order problem

2015-11-23 Thread Guozhang Wang
Yonghui, With ack = 0 and retries > 0 this could happen since producer.send() returns before it gets acked from the broker, so you could get the following trace: a. msg1 sent, produce() returned. b. msg2 sent. c. msg1 failed, and retried. d. msg2 acked. e. msg1 acked. Assuming you said "msg1 and

Re: message order problem

2015-11-23 Thread Yonghui Zhao
The ack mode is default value 0. - 0, which means that the producer never waits for an acknowledgement from the broker (the same behavior as 0.7). This option provides the lowest latency but the weakest durability guarantees (some data will be lost when a server fails). And msg1 and

Re: message order problem

2015-11-20 Thread Guozhang Wang
Yonghui, What is the ack mode for the producer clients? And are msg1 and msg2 sent by the same producer? Guozhang On Thu, Nov 19, 2015 at 10:59 PM, Yonghui Zhao wrote: > Broker setting is: 8 partitions, 1 replica, kafka version 0.8.1 > > We send 2 message at almost same time. > > Msg1 first,

message order problem

2015-11-19 Thread Yonghui Zhao
Broker setting is: 8 partitions, 1 replica, kafka version 0.8.1 We send 2 message at almost same time. Msg1 first, Msg2 second. We have more than 1 producers in sync mode. We may send msg1 in one broker, after *producer.send return response* And send msg2 in the other broker. Both 2 msg has