Received invalid offset -1001on ProduceAsync but consumer receives the message.
During sint and uat, my consumer did not receive any messages when producer responded invalid offset [-1001] . This is my first time to successfully receive message from kafka even failed during producing message.
Hope you can help me with this issue.
Does -1001 invalid offset means successful on produce or failed?
Please provide the following information:
It means you don't know - it seems a problem occurred that meant the broker could not respond to the client about the delivery of the message before the produce call timed out. this is a fundamental limitation.
you can get better semantics by enabling idempotent producer + by using the upcoming transactions capability.
But as per checking -1001 invalid offset message is same with when kafka is unavailable, does it mean -1001 invalid offset response is the same with request time out and kafka unavailable
We have observed a _positive/success_ delivery result with Offset == -1001 for a Task<DeliveryResult> ProduceAsync() call in our application (at least it seems like it). Is that really possible? I would expect an exception when the client does not receive an ACK from the broker.
(Confluent.Kafka v1.3.0, Acks.All, EnableIdempotence=true, EnableDeliveryReports=true)
This can happen with the idempotent producer for implicitly acked messages, i.e., if batch 1 is successfully acked, batch 2's ack is lost due to e.g. request timeout, but batch 3 is acked it means that batch 2 is implicitly acked through batch 3's ack, but the offsets of the batch 2 is not known.
This scenario should be pretty rare though, if your cluster and network is healthy.
Just of curiosity, could you point me to any documentation, design or KIP document mentioning this behavior? My Google-fu is not so strong today...
https://docs.google.com/document/d/11Jqy_GjUGtdXJK94XGsEIK7CP1SnQGdp2eF0wSw9ra8/edit
(linked from KIP-98)