Re: enable.idempotence=true and Retriable exceptions

2017-07-02 Thread Matthias J. Sax
I you set `enable.idempotence=true`, the producer will retry internally.
Thus, it should never throw an retriable exception in the first place
(so there is nothing to ignore :)).


-Matthias

On 7/2/17 6:28 PM, Gary Struthers wrote:
> I currently catch and retry Retriable exceptions. The v11 docs say if 
> enable.idempotence=true than my application shouldn’t retry if these 
> exceptions are thrown because my retries wouldn’t be idempotent. Am I 
> supposed to ignore these exceptions now? I use the Java driver.
> 
> Gary
> 



signature.asc
Description: OpenPGP digital signature


enable.idempotence=true and Retriable exceptions

2017-07-02 Thread Gary Struthers
I currently catch and retry Retriable exceptions. The v11 docs say if 
enable.idempotence=true than my application shouldn’t retry if these exceptions 
are thrown because my retries wouldn’t be idempotent. Am I supposed to ignore 
these exceptions now? I use the Java driver.

Gary

Re: about Exactly-once Semantics

2017-07-02 Thread Hans Jespersen
When you write the msg results to MySQL, you include the offset of the message 
with the results. This can be done in one atomic write transaction. Then if 
your application crashes, when it starts back up, it should read the offset 
stored with the last message results in the database, then seek() to that 
offset, and continue consuming with exactly once semantics.

This is how many of the exactly once Kafka Connect Sink Connectors work today.

-hans

> On Jul 1, 2017, at 11:28 PM, fuyou  wrote:
> 
> I read the great blog about kafka Exactly-once Semantics
> 
> .
> my question is when consumer receive msg,and process the msg  result save
> to db(eg.MySQL),how to keep Exactly-once Semantics.
> 
> I think the kafka Exactly-once Semantics useful when consumer  process the
> msg result save to kafka.
> 
> am i right ?
> 
> thanks .
> -- 
>   =
> 
>  fuyou001
> Best Regards