Sending with outbox and outside a message handler


Is it possible to publish/send outside a message handler and using the outbox pattern with a business transaction ?

If yes, is there any sample for inspiration ?



Currently NServiceBus does not support this scenario. You might want to take a look at this recent thread Homegrown outbox (store and forward) for send-only endpoints and also the older one Outbox in an ASP.NET Core scenario.

The community-base solutions that you might find useful are


Hi @SzymonPobiega

Thanks for your reply!

It seems the community-base solutions relys on SqlServer, and I’m unfortunately in a context where SqlServer couldn’t be used, we have only PostgreSQL engine.

Best regards

@manuc66 then maybe the WebOutbox can be modified to include a concept of SQL dialect? The connector depends on the SQL transport so it seems not feasible to port it to PostgreSQL unless there is a PostgreSQL transport.