shan305 opened a new pull request, #21233:
URL: https://github.com/apache/kafka/pull/21233

   While reading through `Sender.handleProduceResponse`, I wanted to 
double-check my understanding of how produce responses are matched back to 
`ProducerBatch` instances.
   
   From what I can tell, the matching logic prefers `topicId` when present 
(v13+), and otherwise falls back to topic name + partition, using a topic-name 
snapshot captured before the request is sent.
   
   This makes sense, but I wanted to confirm the intended guarantees here, 
especially since metadata can change while a produce request is in flight (for 
example: topic recreation or leadership changes).
   
   In particular, I’m trying to understand:
   - Whether we rely on the pre-send topic snapshot to always resolve a 
non-zero `topicId` in the response
   - Whether a `batch == null` case is considered impossible by design, or 
treated as a deliberate hard failure
   
   No behavior change proposed yet — opening this mainly to confirm assumptions 
before going any deeper.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to