Skip to content

Publishing events default strategy - interrupted when error occured inside handler. #947

Answered by jbogard
LukasKuchta asked this question in Q&A
Discussion options

You must be logged in to vote

You'll want to create your own publish strategy for this, which is easy to do. Just create a class that implements INotificationPublisher and register it in AddMediatR with the NotificationPublisher property.

Is this expected behavior? Yes. Is it desired? That's entirely up to you.

That being said, some folks prefer to handle that logic inside the handler using something like Polly. But it's very easily extensible to do whatever you want.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LukasKuchta
Comment options

Answer selected by LukasKuchta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants