You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/13 22:09:42 UTC

[jira] [Commented] (KAFKA-4761) NullPointerException if batch.size=0 for producer config

    [ https://issues.apache.org/jira/browse/KAFKA-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15864550#comment-15864550 ] 

ASF GitHub Bot commented on KAFKA-4761:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/2545


> NullPointerException if batch.size=0 for producer config
> --------------------------------------------------------
>
>                 Key: KAFKA-4761
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4761
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.10.2.0
>         Environment: jdk1.8.0_40
>            Reporter: Swen Moczarski
>            Assignee: Jason Gustafson
>            Priority: Blocker
>             Fix For: 0.10.2.0
>
>         Attachments: KafkaProducerTest.java
>
>
> When setting {{batch.size}} to {{0}} for producer I get the following exception when sending a record:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.kafka.common.utils.Utils.notNull(Utils.java:315)
> 	at org.apache.kafka.clients.producer.internals.RecordAccumulator.append(RecordAccumulator.java:197)
> 	at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:478)
> 	at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:440)
> 	at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:360)
> 	at KafkaProducerTest.exposeNpeOnBatchSizeZero(KafkaProducerTest.java:21)
> {noformat}
> But documentation says:
> {quote}
>  ... (a batch size of zero will disable batching entirely).
> {quote}
> Please, see attached test.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)