MassTransit with SQL Server Database Transport
Asked Answered
P

2

6

For my client we're investigating the use of MassTransit. MassTransit seems to be focussed around RabbitMQ as for message transport. Due 'intrastructural constraints' of the client, we're stuck with using SQL Server database as any persistence.

How can MassTransport be used with SQL Server as transport mechanism for messages?

Phage answered 18/7, 2016 at 7:49 Comment(1)
Well, if you take some significant effort to implement all transport features for SQL Server, you can do that.Organometallic
E
3

As of late 2023, there is a native way to do this at least for SQL (ideally Postgres because of Listen/Notify capability). They have introduced a SQL/DB transport.

You can find documentation, a video explanation and a sample on their website.

Eradis answered 23/4 at 17:17 Comment(0)
F
3

SQL Server is not a transport, it only stores messages. Without a broker, there's no way to get MassTransit to work. With older MassTransit (2.x) you could use Subscription Service to replace the broker, but it requires some additional infrastructure.

Using Azure/Windows Service Bus would be a better solution as it's a real broker. You don't have to use RabbitMQ.

Farron answered 18/7, 2016 at 14:10 Comment(3)
There is a transport made on SQL Server for NServiceBus. It uses tables as "queues" and constant polling to get "messages". I guess the question was about this. In essence I completely agree with you but this SQL Server thing got quite a lot of traction with NServiceBus.Organometallic
An old rant, but here it is again: mikehadlow.blogspot.com/2012/04/…Commingle
@ChrisPatterson NServiceBus isn't using SQL server in a way described in the post You linked to. In the post the worker understands the record. In NSB the table is used just as a storege for serialized messages. Once the message is processed it is deleted from the table.Halfmoon
E
3

As of late 2023, there is a native way to do this at least for SQL (ideally Postgres because of Listen/Notify capability). They have introduced a SQL/DB transport.

You can find documentation, a video explanation and a sample on their website.

Eradis answered 23/4 at 17:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.