.net - F# Event Handlers - Ensuring crash in one handler doesn't affect the others -


a tool working on requires reliable delivery of events between participating entities.

in .net/f# eventing infra (i.e. event<>/ievent<>), framework not guarantee event handlers called. e.g. crash in 1 handler may crash entity firing events , prevent other handlers being called.

i understand reason why framework cannot guarantee viz. wouldn't have enough knowledge required catch/bubble/propagate application exceptions.

however app, thinking of writing 'derivative' of event<>/ievent<> infra [a] prevent handler exceptions bubbling [b] guaranteeing handlers called [c] fits language

i have said 'derivative' don't have design in mind yet. few questions before start:

have folks done before? there better way achieve goals?

if want guaranteed delivery of messages (events), you'll need put them on persistent pub/sub system (such rabbitmq, azure service bus, etc.).

with persisted messages, subscribers can handle messages independently of each other. if 1 subscriber crashes, still gets chance retry later, , doesn't affect other subscribers.


Comments