How to handle RabbitMqConnectionException on Bus.Start()

96 views
Skip to first unread message

IlyaR

unread,
Nov 28, 2017, 4:54:58 AM11/28/17
to masstransit-discuss
Hi all.

While working with MassTransit, we have come upon a situation we are unsure how to handle and couldn't get the answer from documentation.

What should be our actions when Bus.Start() throws an RabbitMqConnectionException?

1. Should we rely on auto reconnection and do nothing (it is recovered).
2. Close the bus and try to create a new one(bus cannot be recovered).
3. Shutdown the application.
4. do something else entirely.

We are using MassTransit version 3.5.7 .
Thanks in advance for the answer.

Chris Patterson

unread,
Nov 29, 2017, 10:49:14 AM11/29/17
to masstrans...@googlegroups.com
If the bus Start fails, your service should fail to start, allowing the service control manager to either restart or alert that the service isn't running.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/fea9896b-b81d-4a32-9b6b-8f5f5eac3014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

IlyaR

unread,
Nov 30, 2017, 2:23:43 AM11/30/17
to masstransit-discuss
Thanks for your answer.

We have hit the issue, that after catching that exception, reconnection attempts didn't stop. After service became available, it was possible to send and receive messages using MessageReceiveClient. But application couldn't exit normally after that.

That's why we decided to ask for clarification on how we are supposed to use it.

среда, 29 ноября 2017 г., 18:49:14 UTC+3 пользователь Chris Patterson написал:
If the bus Start fails, your service should fail to start, allowing the service control manager to either restart or alert that the service isn't running.
On Tue, Nov 28, 2017 at 3:54 AM, IlyaR <ir98...@gmail.com> wrote:
Hi all.

While working with MassTransit, we have come upon a situation we are unsure how to handle and couldn't get the answer from documentation.

What should be our actions when Bus.Start() throws an RabbitMqConnectionException?

1. Should we rely on auto reconnection and do nothing (it is recovered).
2. Close the bus and try to create a new one(bus cannot be recovered).
3. Shutdown the application.
4. do something else entirely.

We are using MassTransit version 3.5.7 .
Thanks in advance for the answer.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages