arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
277 stars 129 forks source link

Unhandled rejection #79

Closed celsomarques closed 6 years ago

celsomarques commented 7 years ago

Hi there,

My app lost its connection to RabbitMQ after a moment and there were no errors before the following message:

Potentially unhandled rejection [9] Error: Publish failed - no exchange job-message.ex on connection default is defined

How can I handle that? Does rabbot not able to reconnect automatically?

Thx

arobson commented 6 years ago

@celsomarques - publishes return a promise to indicate whether or not they have succeeded, if you don't have a rejection handler, that's going to show up.

The 2.x release I plan to cut later this week will have a slight improvement to publishing. Rabbot does re-establish connections and topologies if you've configured it correctly. I've tested this functionality a lot.

There are limits to what it can do practically though. Check out the doc on (Connection Management)[https://github.com/arobson/rabbot/blob/master/docs/connections.md] to see if it helps clarify the limits and controls you have at your disposal.