gems waterdrop 2.10.0
v2.10.0

4 hours ago
  • [Fix] Clean up native rdkafka client, global instrumentation callbacks, and poller registration when init_transactions fails during producer client construction. Previously, each failed attempt permanently leaked native threads, pipe file descriptors, and callback registry entries because the started rd_kafka_t handle was abandoned without being destroyed.
  • [Breaking] Skip emitting librdkafka statistics when nothing is subscribed to statistics.emitted at the time the underlying rdkafka client is constructed. When no listener is present at build time, statistics.interval.ms is forced to 0 regardless of user configuration and the statistics callback is not registered, saving substantial allocations in the hot path (no JSON parsing, no statistics hash materialization, no decoration work). To use statistics, subscribe a listener to statistics.emitted BEFORE the first producer use (before the underlying client is lazily initialized).
  • [Breaking] Raise WaterDrop::Errors::StatisticsNotEnabledError when attempting to subscribe to statistics.emitted (either via block or via a listener that responds to on_statistics_emitted) on a monitor where librdkafka statistics have been disabled at client build time. This replaces the "silent nothing" failure mode with an immediate, actionable error that pinpoints the timing mistake.
  • [Feature] Add tombstone API (#tombstone_sync, #tombstone_async, #tombstone_many_sync, #tombstone_many_async) for producing tombstone records (nil-payload messages) with required key and partition validation. Works with variants.
  • [Fix] Add ensure_same_process! to Poller#unregister for fork safety. Without this, a child process that inherited a pre-fork producer would deadlock on producer.close because unregister waited on a latch the dead parent poller thread would never release.

Don't miss a new waterdrop release

NewReleases is sending notifications on new releases.