ScalaConsultants / reactive-rabbit

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

Connection not released causing scala app to hang #16

Closed scalame closed 8 years ago

scalame commented 9 years ago

The rabbitmq connection is never closed/released after shutting down the actor system and requires an explicit interruption from the user to exit the app

mkiedys commented 9 years ago

There are two ways of solving this problem: 1) auto closing after last subscriptions gets canceled 2) explicit close method in Connection

Which one do you prefer?

scalame commented 9 years ago

May I suggest another solution: Exposing the classes/objects under the impl package. I found myself needing to extend ExchangeSubscriber so that I can log messages that were not published to the queue. With this possible solution one can also cast a Connection to RabbitMqConnection to explicitly close the connection to rabbitmq

mkiedys commented 9 years ago

Can you describe why you extended ExchangeSubscriber? Would be interesting to know what is your usage pattern for that.