ScalaConsultants / reactive-rabbit

Reactive Streams driver for AMQP protocol. Powered by RabbitMQ library.
Apache License 2.0
184 stars 40 forks source link

Added an implicit parameter for the ExecutionContext #53

Open breckcs opened 7 years ago

breckcs commented 7 years ago
mkiedys commented 7 years ago

I feel that we can retain compatibility while also allowing people to pass their own execution context. Akka faced similar problem, and they way they are doing it is quite good. Can you look at ActorSystem companion object?

We could still use default shared thread pool of two by default that gets disposed after last connection is closed but also allow people to pass their own ExecutionContext that they control and shutdown after it is no longer needed. It is both more convenient and most likely more performant solution to have some sane defaults.