Skip to content

Allow dispatcher to batch multiple isolated dispatches per destination #857

@danielmarbach

Description

@danielmarbach

Multiple isolated dispatches (possible when the outbox is at play with a handler or a transactional session that sends multiple messages) can be batched for efficiency reasons as explained in

// Changing the dispatch consistency to be isolated to make sure the transport doesn't
// enlist the operations in the receive transaction. The transport might still want to batch
// operations for efficiency reasons but should never enlist in the incoming transport transaction.
// Otherwise a failure to ACK the incoming message after Outbox storage has been set to Dispatched
// would result in outgoing message loss.

https://github.com/Particular/NServiceBus/blob/master/src/NServiceBus.Core/Reliability/Outbox/ForceBatchDispatchToBeIsolatedBehavior.cs#L14-L19

For efficiency reasons it would be possible to change the dispatcher to account for those scenarios instead of doing individual broker calls as long as those operations are not enlisted in the receive transaction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions