Outbox - suppress for specific messages

Hi there,

We have some scenarios (check Azure file share for new files on a schedule, put a command on bus for processing) that generate a LOT of outbox data and don’t really require an outbox. The handlers are idempotent by design and will ignore duplicate messages. Any dropped messages are no problem - next schedule run will send a new message.

Is there a way to suppress outbox for this scenario?


Hi Gursharan,

Sounds like in that case you can use immediate dispatch:

Such message will not be stored in the outbox record and as the name implies be send immediately. Meaning, these sends will not be rolled back if any processing errors occur.

It might be wise to set the Message ID for such message so that deduplication can occur.

That should not be a problem if as you say your processing is idempotent to always generate the same key might the processing happen more-than-once.

– Ramon

1 Like

Thank you! I suspected that would be it however wasn’t sure reading the documentation.

Thanks for the feedback. I raised a pull request to improve the documentation on the topic.


Thank you!

In case any one lands here, remember to filter out audit messages as well (they also are in outbox) - Audit Filter Pipeline Extension • NServiceBus Samples • Particular Docs

Hey, sorry to pile onto the same thread.

Is there a way to opt out of dedup storage selectively?