Hi,
We’re seeing a strange behaviour from KafkaProducer.send method.
According to kafka 2.7.0 API :
Asynchronously send a record to a topic and invoke the provided callback when the send has been acknowledged.
The send is asynchronous and this method will return immediately once the record has been stored in the buffer of records waiting to be sent. This allows sending many records in parallel without blocking to wait for the response after each one.
However when we use that it actually blocks as opposed to the documentation.
This does not allow us to utilise the asynchronous mechanism and makes the returned Future unusable.
- Anyone know what’s the deal with that? Is that a bug in the documentation or the implementation?
- Can we assume that the method is indeed blocking? Are we guaranteed once it returns that records have been acknowledged?