Reliable messaging
See original GitHub issueAs far as I understand MT in comparison to NServiceBus does not support reliable messaging out of the box. (correct me, if I’m wrong, I’d be very happy to be mistaken).
Yet I see an option of using the underlying RabbitMQ for that purpose. Here is the workflow:
- do some biz rules
- generate special correlation id
- store this id in db
- publish a message
- commit transaction
But instead of going to consumers message first goes to a special ‘loopback queue’, where it is processed by the sender/publisher part or by some dedicated service which has a task of looking inside DB for a corresponding correlation id, and in case of success putting message in correct exchanges.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17 (9 by maintainers)
Top Results From Across the Web
WS-ReliableMessaging
WS-ReliableMessaging describes a protocol that allows SOAP messages to be reliably delivered between distributed applications in the presence of software ...
Read more >Nobody Needs Reliable Messaging - InfoQ
Reliable messaging is the guarantee that a message sent by a sending application is indeed received at the other end, and received only...
Read more >WS-ReliableMessaging - How it works
WebSphere® Application Server uses WS-ReliableMessaging as part of the transport layer for SOAP over HTTP messages. The message exchange patterns that are ...
Read more >An Introduction to Web Services Reliable Messaging - InfoQ
Web Services Reliable Messaging (WSRM) is a specification that allows two systems to send messages between each other reliably.
Read more >WS-ReliableMessaging
The WS-ReliableMessaging protocol relies on a sequence to manage the transmission of messages from reliable messaging source to reliable messaging destination.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m comparing CAP to MassTransit, and this will be a deciding factor for me. Can you provide a quick code example of how this Outbox pattern would be implemented with Azure ServiceBus and SQL Server? I’m not familiar enough with Mass Transit to take your awesome diagram and put it into practice.
My last two cents in this issue.
NServiceBus reliable messaging (Outbox) only works when you use the same database and access method (framework) for your usual database operations performed from inside the message consumers and for the outbox persistence itself. This database also needs to support transactions that span across several operations. It means that NSB supports this feature only for NHibernate, SQL (ADO.NET), RavenDb and ServiceFabric, using the synchronized storage.
I actually think it can be done with MassTransit by creating a persisted outbox filter. The database connection and transaction can be put into the context so they can be used inside a consumer.
This is the NSB implementation, it really looks like a filter: