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. Rebootstrap is also triggered if connection cannot be established to any of the brokers for metadata.recovery.rebootstrap.trigger.ms milliseconds or if server requests rebootstrap.
Default Values by Kafka Version
| Component | Kafka version line | Documented default |
|---|---|---|
| Consumer | 3.8 | none |
| Consumer | 3.9 | none |
| Consumer | 4.0 | rebootstrap |
| Consumer | 4.1 | rebootstrap |
| Consumer | 4.2 | rebootstrap |
| Consumer | 4.3 | rebootstrap |
| Consumer | 4.4 | rebootstrap |
| Producer | 3.8 | none |
| Producer | 3.9 | none |
| Producer | 4.0 | rebootstrap |
| Producer | 4.1 | rebootstrap |
| Producer | 4.2 | rebootstrap |
| Producer | 4.3 | rebootstrap |
| Producer | 4.4 | rebootstrap |
| Connect Worker | 3.8 | none |
| Connect Worker | 3.9 | none |
| Connect Worker | 4.0 | rebootstrap |
| Connect Worker | 4.1 | rebootstrap |
| Connect Worker | 4.2 | rebootstrap |
| Connect Worker | 4.3 | rebootstrap |
| Connect Worker | 4.4 | rebootstrap |
| Kafka Streams | 4.0 | rebootstrap |
| Kafka Streams | 4.1 | rebootstrap |
| Kafka Streams | 4.2 | rebootstrap |
| Kafka Streams | 4.3 | rebootstrap |
| Kafka Streams | 4.4 | rebootstrap |