How to avoid the error queue?

52 views
Skip to first unread message

Дмитрий Ушенко

unread,
Nov 24, 2017, 3:33:09 AM11/24/17
to masstransit-discuss
I have a saga that is able to handle Fault<T> message in case of any exception. And i don't want to have this message in the error queue. So how can i avoid putting this failed message in error queue on the consumer side? 

Alexey Zimarev

unread,
Nov 25, 2017, 5:28:07 AM11/25/17
to masstransit-discuss
You cannot avoid it. Faults are published and messages are moved to the poison message queue by the same middleware.

You can avoid this by handlng the exception yourself and publishing a custom message when it happens, then swallowing the exception in the consumer. Then, the saga need to handle this custom fault instead of the Fault<T>. Just normal programming, nothing special.

Дмитрий Ушенко

unread,
Nov 26, 2017, 12:50:48 PM11/26/17
to masstrans...@googlegroups.com
I think this would be a nice feature to have then. For example having an ability to configure this behavior on message level during receive endpoint configuration.

сб, 25 нояб. 2017 г., 13:28 Alexey Zimarev <azim...@gmail.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/SD2oPrl3DUU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/58886f3a-b38a-4fd7-bcb8-7cc1a5e7ed46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexey Zimarev

unread,
Nov 27, 2017, 1:48:07 PM11/27/17
to masstransit-discuss
Sometimes I feel like yes, I am with you on that, but at the other hand, if you want to handle exceptions yourself, you should convert your Faults to domain exceptions and publish events accordingly, then handle them. So, do not outsource something you should be doing youself, to a framework.

Дмитрий Ушенко

unread,
Nov 27, 2017, 2:14:42 PM11/27/17
to masstrans...@googlegroups.com

May be you are right. But im still think this could be a nice feature. Something similar to Ignore API in state machines.
Well, will code this wonderful middleware by myself ))


пн, 27 нояб. 2017 г., 21:48 Alexey Zimarev <azim...@gmail.com>:
Sometimes I feel like yes, I am with you on that, but at the other hand, if you want to handle exceptions yourself, you should convert your Faults to domain exceptions and publish events accordingly, then handle them. So, do not outsource something you should be doing youself, to a framework.

--
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/SD2oPrl3DUU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages