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

Configurable shared executor service for com.rabbitmq.client.impl.ConsumerWorkService #694

Closed
retriku opened this issue Feb 18, 2022 · 1 comment

Comments

@retriku
Copy link
Contributor

retriku commented Feb 18, 2022

We have found necessity to provide shared java.util.concurrent.ExecutorService to com.rabbitmq.client.impl.ConsumerWorkService. This is because default executor service uses twice the number of Runtime.getRuntime().availableProcessors(), which turns out to be too big for our needs, leading to wasted resources. Also current implementation restricts our ability to test latest thread pool by Cats Effect 3, which is used for both non-blocking and blocking operations (since 3.3.2). See https://discord.com/channels/632277896739946517/632278585700384799/943070620621619251, also in https://typelevel.org/cats-effect/docs/migration-guide#blocker.

I suggest following RabbitClient takes some ec: Option[F[ExecutionContext]] = None, which is then used like ec.getOrElse(Async[F].executionContext). What do you say @jbwheatley ?

@retriku
Copy link
Contributor Author

retriku commented Mar 11, 2022

Solved since version 5.0.0

@retriku retriku closed this as completed Mar 11, 2022
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