You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Franco Giacosa <fg...@gmail.com> on 2016/02/23 14:14:21 UTC

property block.on.buffer.full default value

Hi Guys,

I was going over the producer kafka configuration, and the
property block.on.buffer.full in the documentation says:

"When our memory buffer is exhausted we must either stop accepting new
records (block) or throw errors. *By default this setting is true* and we
block, however in some scenarios blocking is not desirable and it is better
to immediately give an error. Setting this to false will accomplish that:
the producer will throw a BufferExhaustedException if a recrord is sent and
the buffer space is full."

So theoretically it should be true, but in that same documentation (
http://kafka.apache.org/documentation.html) the table has a column called
"default" that points out that the default value is actually false.

Which one is correct?

Thanks.

Re: property block.on.buffer.full default value

Posted by Franco Giacosa <fg...@gmail.com>.
Ok, thanks tao.

btw: I think this is a small bug.

2016-02-23 14:24 GMT+01:00 tao xiao <xi...@gmail.com>:

> The default value is false.
>
>
> https://github.com/apache/kafka/blob/d5b43b19bb06e9cdc606312c8bcf87ed267daf44/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java#L232
>
> On Tue, 23 Feb 2016 at 21:14 Franco Giacosa <fg...@gmail.com> wrote:
>
> > Hi Guys,
> >
> > I was going over the producer kafka configuration, and the
> > property block.on.buffer.full in the documentation says:
> >
> > "When our memory buffer is exhausted we must either stop accepting new
> > records (block) or throw errors. *By default this setting is true* and we
> > block, however in some scenarios blocking is not desirable and it is
> better
> > to immediately give an error. Setting this to false will accomplish that:
> > the producer will throw a BufferExhaustedException if a recrord is sent
> and
> > the buffer space is full."
> >
> > So theoretically it should be true, but in that same documentation (
> > http://kafka.apache.org/documentation.html) the table has a column
> called
> > "default" that points out that the default value is actually false.
> >
> > Which one is correct?
> >
> > Thanks.
> >
>

Re: property block.on.buffer.full default value

Posted by tao xiao <xi...@gmail.com>.
The default value is false.

https://github.com/apache/kafka/blob/d5b43b19bb06e9cdc606312c8bcf87ed267daf44/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java#L232

On Tue, 23 Feb 2016 at 21:14 Franco Giacosa <fg...@gmail.com> wrote:

> Hi Guys,
>
> I was going over the producer kafka configuration, and the
> property block.on.buffer.full in the documentation says:
>
> "When our memory buffer is exhausted we must either stop accepting new
> records (block) or throw errors. *By default this setting is true* and we
> block, however in some scenarios blocking is not desirable and it is better
> to immediately give an error. Setting this to false will accomplish that:
> the producer will throw a BufferExhaustedException if a recrord is sent and
> the buffer space is full."
>
> So theoretically it should be true, but in that same documentation (
> http://kafka.apache.org/documentation.html) the table has a column called
> "default" that points out that the default value is actually false.
>
> Which one is correct?
>
> Thanks.
>