Network layer code is already rather complex and I would avoid this type of 
client logic into this layer unless there was no other way. For disconnections, 
we already propagate channel state to clients and it would be quite easy to add 
another state to indicate that it may want to retry. A few advantages of doing 
it this way:
1. Keep network layer changes to minimum
2. We want to make this change only for clients, so the keeping the change in 
the client layer makes sense (making it easier to read the code when debugging 
broker issues)
3. Reduces the footprint of this change
4. Keeps the handling of different variations of this config in the same layer 
(since the other values of this config are handled in the client layer)

I haven't followed KIP-81 PR discussions, so if there are other reasons to make 
this change in `Selector`, then perhaps it may make sense. But just looking at 
this one, it feels like it should be the responsibility of `NetworkClient` to 
iterate through the addresses.

@hachikuji Since you reviewed the KIP-81 PR, what do you think?


[ Full content available at: https://github.com/apache/kafka/pull/4987 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to