Skip to content

Conversation

@shihaoH
Copy link

@shihaoH shihaoH commented Dec 26, 2025

Summary

  • Replace AIOKafkaProducer.send with send_and_wait inside AioKafkaBroker.kick.
  • Ensures the broker call completes only after the producer receives broker ack or raises (timeouts/auth/SSL), instead of silently succeeding after buffering.

Why

Currently kick uses send, which enqueues to the local buffer and returns immediately; transport-level failures are not propagated, so middlewares may mark messages as sent even when the broker rejected them. send_and_wait follows the aiokafka recommended pattern and surfaces real send outcomes.

Reference

aiokafka docs: https://aiokafka.readthedocs.io/en/stable/producer.html

fixes: #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Use send_and_wait in AioKafkaBroker.kick to surface producer errors and avoid false-positive sends

1 participant