Improve bunny exceptions handling #137

Closed
lostie opened this Issue Mar 6, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@lostie

lostie commented Mar 6, 2015

Quite recently I was using Hutch to publish some messages to RabbitMQ and I stopped the RabbitMQ server during that process (on purpose, for test purposes).

My application ended up getting the following exception:

Bunny::ConnectionForced (Connection-level error: CONNECTION_FORCED - broker forced connection closure with reason 'shutdown')

My publisher implementation already handles Hutch exceptions

I was wondering if Hutch should be handling Bunny exceptions so that whoever is using Hutch does not need to know that Hutch is using Bunny under the hood.

@michaelklishin and @hutch-community : What's your thoughts on it?

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Mar 6, 2015

Collaborator

I find it unfortunate that Hutch had to re-invent pretty much the same exceptions but since it already has an exception for publishing errors, we can do that.

The exception you are seeing is not thrown on publish, though. It is RabbitMQ closing connection because it is shutting down.

Collaborator

michaelklishin commented Mar 6, 2015

I find it unfortunate that Hutch had to re-invent pretty much the same exceptions but since it already has an exception for publishing errors, we can do that.

The exception you are seeing is not thrown on publish, though. It is RabbitMQ closing connection because it is shutting down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment