Skip to content

docs: add warning about closing producers from notification callbacks#399

Merged
mensfeld merged 1 commit intomasterfrom
docs/warn-producer-close-from-callbacks
Feb 17, 2026
Merged

docs: add warning about closing producers from notification callbacks#399
mensfeld merged 1 commit intomasterfrom
docs/warn-producer-close-from-callbacks

Conversation

@mensfeld
Copy link
Member

Summary

  • Adds a warning admonition in the WaterDrop Usage documentation about not closing producers from within notification callbacks
  • This edge case was identified during the implementation of FD-based polling mode (Add FD-based polling mode for fiber scheduler compatibility waterdrop#780)
  • When using FD polling mode, callbacks like message.acknowledged and statistics.emitted execute on the poller thread, and closing the producer from there can lead to synchronization issues or deadlocks

Test plan

  • Verified markdown linting passes (npm run lint)

Adds an admonition warning users not to close WaterDrop producers from
within their own notification callbacks (e.g., message.acknowledged,
statistics.emitted). When using FD polling mode, these callbacks execute
on the poller thread, and closing the producer from within can cause
synchronization issues or deadlocks.

Related to: karafka/waterdrop#780
@mensfeld mensfeld merged commit 10271ab into master Feb 17, 2026
4 checks passed
@mensfeld mensfeld deleted the docs/warn-producer-close-from-callbacks branch February 17, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant