Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4761

NullPointerException if batch.size=0 for producer config

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.10.2.0
    • Fix Version/s: 0.10.2.0
    • Component/s: clients
    • Labels:
      None
    • Environment:
      jdk1.8.0_40

      Description

      When setting batch.size to 0 for producer I get the following exception when sending a record:

      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)
      

      But documentation says:

      ... (a batch size of zero will disable batching entirely).

      Please, see attached test.

        Attachments

          Activity

            People

            • Assignee:
              hachikuji Jason Gustafson
              Reporter:
              moczarski Swen Fuhrmann

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment