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

Passing ExecutionContext for asynchronous execution #30

Open
LGLO opened this issue Jan 11, 2016 · 2 comments
Open

Passing ExecutionContext for asynchronous execution #30

LGLO opened this issue Jan 11, 2016 · 2 comments

Comments

@LGLO
Copy link
Contributor

LGLO commented Jan 11, 2016

Reactive streams (JVM) specification mandates some part of code to be executed synchronously (but quickly) and some other asynchronously.
I think it is good idea to allow to pass ExecutionContext in each publish and consume method (as implicit with default ExecutionContext.Implicits.global).

@LGLO
Copy link
Contributor Author

LGLO commented Jan 11, 2016

1st problem - cannot have two overloaded functions with default parameter value.
So this change will break compilation.
What do you think about renaming one version of publish?
In fact I'd like to have publish which just wraps channel and takes messages with additional Exchange envelope.
@mkiedys could you comment, please?

@mkiedys
Copy link
Contributor

mkiedys commented Jan 11, 2016

I would rather see it being provided only once per connection: preferebly in settings. Worth noticing is that we already use one thread pool: amqp-client creates two threads that await on connections and execute handlers. This is what would work best IHMO: thread pool provided via settings that is used by amqp-client and everywhere else.

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

2 participants