The current LettuceConnectionConfiguration requires too much code to be written when additional settings such as Cluster NodeFilter are needed. Therefore, to enhance scalability, I have added a ClientOptions Customizer.

Comment From: pivotal-cla

@SOOHYUN-LIM Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@SOOHYUN-LIM Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

Thanks for the proposal.

This would leave us with the existing LettuceClientConfigurationBuilderCustomizer that can customize an entire LettuceClientConfigurationBuilder and the new ClientOptionsBuilderCustomizer that can be used to customize the builder that creates the client configuration's ClientOptions. Having a second customizer that targets a subset of another customizer is unusual and I'm not 100% sure what we should do. We could:

  1. Keep things as proposed with some additions to the javadoc of LettuceClientConfigurationBuilderCustomizer to draw attention to ClientOptionsBuilderCustomizer and vice versa
  2. Maybe add a default method to the existing LettuceClientConfigurationBuilderCustomizer for customization of the client options. This may cause problems with the use of method references.
  3. Leave things as they are but this would require duplicating quite a bit of code as, particularly when using SSL, creating the client options is quite involved

1 is probably the best option but I'd like to discuss with the team.

Comment From: philwebb

WE discussed this as a team and decided that option 1 is the best way to go. We'd like to rename ClientOptionsBuilderCustomizer to LettuceClientOptionsBuilderCustomizer. We can take care of that when we merge the PR.

Comment From: wilkinsona

@SOOHYUN-LIM Thanks very much for making your first contribution to Spring Boot.