[
https://issues.apache.org/jira/browse/KAFKA-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15223607#comment-15223607
]
Ewen Cheslack-Postava commented on KAFKA-3496:
----------------------------------------------
[~fhussonnois] Despite a small # of options, this is actually a pretty
significant change to public interfaces, and pretty much any new config that
adds a pluggable interface will need some discussion. A change like this will
need a
[KIP|https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals].
I'd also consider an alternative as well -- if the current backoff policy
doesn't work well in some cases, is there a *fixed* solution that will work
well? Pluggable interfaces add complexity, compatibility concerns, make it
harder to debug issues as users may have a much wider variety of
configurations, etc. One good solution that is occasionally less than ideal may
very well be better than N optimized solutions.
> Add reconnect attemps policies for client
> -----------------------------------------
>
> 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)