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

Hard redis Dependency #36

Open
sekhrivijay opened this issue Feb 28, 2020 · 0 comments
Open

Hard redis Dependency #36

sekhrivijay opened this issue Feb 28, 2020 · 0 comments

Comments

@sekhrivijay
Copy link

If redis is down the whole reactive app stops working . This is due to the fact that there is no timeout setup

image

To fix the issue

public static final ExecutorService CANCEL_EXECUTOR = Executors.newCachedThreadPool(); .cancelOn(Schedulers.fromExecutor(RedisCacheApiConfiguration.CANCEL_EXECUTOR)) .timeout(Duration.ofMillis(config.getReadTimeout()))
Notice we will need a different scheduler for cancel because redis has a bug where on cancel it blocks the core thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant