|
51 | 51 | drop_if_highmem | |
52 | 52 | max_batch_age | |
53 | 53 | max_retry | |
| 54 | + reconnect_delay_ms | |
54 | 55 | telemetry_meta_data | |
55 | 56 | max_partitions. |
56 | 57 |
|
|
69 | 70 | drop_if_highmem => boolean(), |
70 | 71 | max_batch_age => timeout(), |
71 | 72 | max_retry => infinity | non_neg_integer(), |
| 73 | + reconnect_delay_ms => non_neg_integer(), |
72 | 74 | telemetry_meta_data => map(), |
73 | 75 | max_partitions => pos_integer() |
74 | 76 | }. |
|
87 | 89 | drop_if_highmem => boolean(), |
88 | 90 | max_batch_age => timeout(), |
89 | 91 | max_retry => infinity | non_neg_integer(), |
| 92 | + reconnect_delay_ms => non_neg_integer(), |
90 | 93 | telemetry_meta_data => map(), |
91 | 94 | max_partitions => pos_integer() |
92 | 95 | }. |
|
189 | 192 | %% on the first error; `infinity' (the default) retries forever. Note this |
190 | 193 | %% counts Kafka error responses only; resends triggered purely by connection |
191 | 194 | %% loss are bounded by `max_batch_age', not by `max_retry'. |
| 195 | +%% * `reconnect_delay_ms': default 2000. Base delay in milliseconds before a |
| 196 | +%% disconnected producer tries to reconnect to the partition leader. A random |
| 197 | +%% jitter of 1..1000 ms is added on top so that partition workers do not all |
| 198 | +%% reconnect at the same instant. The very first attempt right after a |
| 199 | +%% disconnect uses no delay (reconnect immediately); the delay applies to |
| 200 | +%% subsequent attempts. |
192 | 201 | -spec start_link(wolff:client_id(), topic(), partition(), pid() | ?conn_down(any()), config_in()) -> |
193 | 202 | {ok, pid()} | {error, any()}. |
194 | 203 | start_link(ClientId, Topic, Partition, MaybeConnPid, Config) -> |
|
0 commit comments