-
-
Notifications
You must be signed in to change notification settings - Fork 44
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 explicit execution context configuration #695
Conversation
Yeah, think this looks like the most sensible way to add a configurable You will unfortunately have do some work to get mima to pass - I think you can do this by new functions with the added argument and deprecating/making package private the old one. i.e. @deprecated("use other apply method with configurable execution context", "4.1.1")
private[interpreter] def apply[F[_]: Async](
config: Fs2RabbitConfig,
dispatcher: Dispatcher[F],
sslContext: Option[SSLContext] = None,
saslConfig: SaslConfig = DefaultSaslConfig.PLAIN,
metricsCollector: Option[MetricsCollector] = None,
threadFactory: Option[F[ThreadFactory]] = None
): F[RabbitClient[F]] = ???
def apply[F[_]: Async](
config: Fs2RabbitConfig,
dispatcher: Dispatcher[F],
sslContext: Option[SSLContext] = None,
saslConfig: SaslConfig = DefaultSaslConfig.PLAIN,
metricsCollector: Option[MetricsCollector] = None,
threadFactory: Option[F[ThreadFactory]] = None,
executionContext: Option[F[ExecutionContext]] = None
): F[RabbitClient[F]] = ??? |
Add execution context config to RabbitClient.resource as well
Hi @jbwheatley! I do not know how to solve these migration issues. Maybe we need to increment major version? |
ah I think you're right, can't get it to work myself either. Default arguments are messy to work with 😿 Thanks for doing the legwork on this PR, if you have the time it would be great if we could go back to just adding the argument to the methods as you had it originally, and then we'll go for a 5.0.0 release |
I introduced builder for RabbitClient. Please, review |
Awesome, the builder stuff is great 👍 Can you keep the existing |
@jbwheatley done! |
Adds configurable execution context while creating RabbitClient. Closes issue #694