metadata.recovery.strategy — Kafka Consumer Configuration
Controls how the client recovers when none of the brokers known to it is available. If set to none, the client fails.
Description
Controls how the client recovers when none of the brokers known to it is available. If set to none, the client fails. If set to rebootstrap, the client repeats the bootstrap process using bootstrap.servers. Rebootstrapping is useful when a client communicates with brokers so infrequently that the set of brokers may change entirely before the client refreshes metadata. Metadata recovery is triggered when all last-known brokers appear unavailable simultaneously. Brokers appear unavailable when disconnected and no current retry attempt is in-progress. Consider increasing reconnect.backoff.ms and reconnect.backoff.max.ms and decreasing socket.connection.setup.timeout.ms and socket.connection.setup.timeout.max.ms for the client.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 3.8 | none |
| 3.9 | none |
| 4.0 | rebootstrap |
| 4.1 | rebootstrap |
| 4.2 | rebootstrap |