question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reliable messaging

See original GitHub issue

As 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

8reactions
joshmouchcommented, Apr 22, 2019

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.

3reactions
alexeyzimarevcommented, Aug 8, 2018

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: outbox

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found