Use `Promise.allSettled` when dispatching to handlers
adenhertog opened this issue · 0 comments
adenhertog commented
When multiple handlers receive the same message, a rejection in one shouldn't stop processing in others. This isn't the case due to the use of Promise.all
in ServiceBus.dispatchMessageToHandlers
.
Consider using Promise.settledAll
and only failing the message after all work has completed and there's at least one rejection.