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

KafkaProducer#send(ProducerRecord,Callback) may block for up to 60 seconds

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: clients, producer
    • Labels:
      None

      Description

      Hello. I was running reactor-kafka with the BlockHound agent (you can see the progress here and even run it yourself) and it detected a very dangerous blocking call in KafkaProducer#send(ProducerRecord,Callback) which is supposed to be async:

      java.lang.Error: Blocking call! java.lang.Object#wait
      	at reactor.BlockHound$Builder.lambda$new$0(BlockHound.java:154)
      	at reactor.BlockHound$Builder.lambda$install$8(BlockHound.java:254)
      	at reactor.BlockHoundRuntime.checkBlocking(BlockHoundRuntime.java:43)
      	at java.lang.Object.wait(Object.java)
      	at org.apache.kafka.clients.Metadata.awaitUpdate(Metadata.java:181)
      	at org.apache.kafka.clients.producer.KafkaProducer.waitOnMetadata(KafkaProducer.java:938)
      	at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:823)
      	at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:803)
      

      it blocks for up to "maxBlockTimeMs" (60 seconds by default)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bsideup Sergei Egorov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: