RE: Why is enable.auto.commit=true the default value for consumer?

2019-02-01 Thread Pellerin, Clement
Yes, that sentence is the source of all that confusion. I learned it was misleading when reading part of the source code. There are also some stack overflow answers that clarify auto-commit. I think you are right, the documentation probably does not say you must process all records in the batch

Re: Why is enable.auto.commit=true the default value for consumer?

2019-02-01 Thread Adam Bellemare
Hi Clement & Colin Thanks for the discussion on this. I think the biggest confusion is how the enable.auto.commit documentation says "If true the consumer's offset will be periodically committed in the background." @Clement, you mention that there is documentation about what you must do with

RE: Why is enable.auto.commit=true the default value for consumer?

2019-01-29 Thread Pellerin, Clement
Indeed, but this is what the documentation says you must do with auto-commit. I say it is a user error if you don't. Regardless, I think this is a fairly common misconception, so it would not hurt to debunk it explicitly in the documentation. -Original Message- From: Colin McCabe

Re: Why is enable.auto.commit=true the default value for consumer?

2019-01-29 Thread Colin McCabe
Hi Clement, You are assuming that the client application is single-threaded-- or at least processes all the records before polling for more. This may or may not be the case. But that is a fair point-- in this case, auto-commit would be safe. best, Colin On Tue, Jan 29, 2019, at 16:23,

RE: Why is enable.auto.commit=true the default value for consumer?

2019-01-29 Thread Pellerin, Clement
I had the same impression at some point but this is not how auto-commit works. Auto-commit can only commit when the application comes back to poll and if it decides to commit at that time, it will only commit the previous batch. In your example, the app might come back and have to re-execute all

Re: Why is enable.auto.commit=true the default value for consumer?

2019-01-29 Thread Colin McCabe
This is a very fair question. I suspect the answer is that people feel that automatic offset commit is easier to get started with, even though it has the error handling shortcomings you mention. It would be very hard to change the default now, since it would break such a huge amount of code.

Why is enable.auto.commit=true the default value for consumer?

2019-01-29 Thread Adam Bellemare
As the question indicates. Should this not be default false? I think this is a bit nefarious to someone launching their application into production without testing it extensively around failure modes. I can see a scenario where a consumer polls for events, processes them, produces to output