Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to customize expected exceptions in DefaultEndpoint #2830

Open
eager-signal opened this issue Apr 16, 2024 · 1 comment
Open

Add option to customize expected exceptions in DefaultEndpoint #2830

eager-signal opened this issue Apr 16, 2024 · 1 comment
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@eager-signal
Copy link

Feature Request

Is your feature request related to a problem? Please describe

We’ve implemented a circuit breaker using a Netty Customizer as suggested in #1530 discussion. We now observe a large volume of logs from DefaultEndpoint when the circuit breaker is open, because the command is completed exceptionally with an exception class that is not expected by this code block.

Describe the solution you'd like

We’d like to specify in ClientOptions a set of exception classes that should not be logged, similar to how ClosedChannelException is skipped. A drawback of this is additional complexity for a relatively advanced use case.

Describe alternatives you've considered

We considered wrapping our internal exception in ClosedChannelException. I believe this would work fine with the current Lettuce implementation, but it seems incorrect to do this, because a Channel that closes cannot re-open, and the circuit breaker will very likely permit future calls on the same channel.

Teachability, Documentation, Adoption, Migration Strategy

This would be opt-in—the default client option would be an empty set.

@mp911de
Copy link
Collaborator

mp911de commented Apr 18, 2024

Thanks a lot for following up. Let's take a step back before digging into code changes. Looking at the broader context, I wonder whether RetryListener usage is even appropriate. When using a CircuitBreaker, I understand that you want to fail fast and not necessarily retry commands.

If so, then it would even make sense to figure out a way to control when to apply at most once/retry listeners onto commands.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants