You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Florian Hussonnois (JIRA)" <ji...@apache.org> on 2016/04/02 17:55:25 UTC

[jira] [Created] (KAFKA-3496) Add policies to reconnection

Florian Hussonnois created KAFKA-3496:
-----------------------------------------

             Summary: Add policies to reconnection
                 Key: KAFKA-3496
                 URL: https://issues.apache.org/jira/browse/KAFKA-3496
             Project: Kafka
          Issue Type: Improvement
          Components: clients
    Affects Versions: 0.10.0.0
            Reporter: Florian Hussonnois


Currently the client reconnection attempts is only controlled by the property : reconnect.backoff.ms

It would be nice to introduce a reconnect attempt policy. At first, two policies may be defined : 
- ConstantReconnectAttemptPolicy
- ExponentialReconnectAttemptPolicy

The policy could be then configure as follows : 

Properties config = new Properties(); config.put(ConsumerConfig.RECONNECT_ATTEMPTS_POLICY_CLASS_CONFIG, "org.apache.kafka.clients.ExponentialReconnectAttemptPolicy");
config.put(ConsumerConfig.RECONNECT_EXPONENTIAL_MAX_DELAY_MS_CONFIG, 5000);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)