Skip to content

docs: document the reconnect_delay_ms producer option - #122

Merged
zmstone merged 1 commit into
kafka4beam:mainfrom
zmstone:260724-doc-reconnect-delay-ms
Jul 24, 2026
Merged

docs: document the reconnect_delay_ms producer option#122
zmstone merged 1 commit into
kafka4beam:mainfrom
zmstone:260724-doc-reconnect-delay-ms

Conversation

@zmstone

@zmstone zmstone commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Make the existing reconnect_delay_ms producer option a first-class, documented option. No behavior change.

Background

reconnect_delay_ms is already accepted and honored by wolff_producer:

  • Default 2000 ms (via use_defaults).
  • Applied in do_ensure_delayed_reconnect/2 as reconnect_delay_ms + rand:uniform(1000) (1..1000 ms jitter, so partition workers do not all reconnect at the same instant).
  • The first reconnect attempt right after a disconnect uses no delay (immediate); the delay applies to subsequent attempts.

But it was missing from the config_key() / config_in() / config_state() type specs and the producer option doc comment, so it was easy to miss and dialyzer did not recognise it as a valid producer config key.

Change

  • Add reconnect_delay_ms to config_key(), config_in(), and config_state().
  • Document it in the producer options doc comment (default, jitter, first-attempt-immediate behavior).
  • Changelog note (unreleased 4.2.0).

Docs/types only — no runtime code path is touched.

`reconnect_delay_ms` is already accepted and used by the producer (default
2000ms, plus 1..1000ms jitter, applied to reconnect attempts after the first),
but it was missing from the `config_key`/`config_in`/`config_state` type specs
and the producer option docs, so it was easy to miss and dialyzer did not
recognise it as a valid key. Add it to the specs and document its behavior.

No behavior change.
@zmstone
zmstone merged commit 4feffa6 into kafka4beam:main Jul 24, 2026
4 checks passed
@zmstone
zmstone deleted the 260724-doc-reconnect-delay-ms branch July 24, 2026 13:43
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.

2 participants