All Projects → rebus-org → Rebus.SqlServer

rebus-org / Rebus.SqlServer

Licence: other
🚌 Microsoft SQL Server transport and persistence for Rebus

Programming Languages

C#
18002 projects
HTML
75241 projects

Projects that are alternatives of or similar to Rebus.SqlServer

Rebus.RabbitMq
🚌 RabbitMQ transport for Rebus
Stars: ✭ 51 (+45.71%)
Mutual labels:  message-queue, transport, rebus
Rebus
🚌 Simple and lean service bus implementation for .NET
Stars: ✭ 1,733 (+4851.43%)
Mutual labels:  message-queue, rebus
Torat
ToRat is a Remote Administation tool written in Go using Tor as a transport mechanism and RPC for communication
Stars: ✭ 415 (+1085.71%)
Mutual labels:  persistence, transport
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (+817.14%)
Mutual labels:  message-queue, transport
RebusSamples
Small sample projects
Stars: ✭ 82 (+134.29%)
Mutual labels:  sql-server, rebus
kubemq-CSharp
C# Library for KubeMQ server
Stars: ✭ 25 (-28.57%)
Mutual labels:  message-queue
public-transit-tools
Tools for working with GTFS public transit data in ArcGIS
Stars: ✭ 126 (+260%)
Mutual labels:  transport
js-coalaip
Javascript implementation for COALA IP
Stars: ✭ 18 (-48.57%)
Mutual labels:  persistence
napalm-logs
Cross-vendor normalisation for network syslog messages, following the OpenConfig and IETF YANG models
Stars: ✭ 131 (+274.29%)
Mutual labels:  transport
sql-source-control
Simple CLI for getting SQL into source control systems.
Stars: ✭ 49 (+40%)
Mutual labels:  sql-server
cdk-ecr-deployment
A CDK construct to deploy docker image to Amazon ECR
Stars: ✭ 51 (+45.71%)
Mutual labels:  transport
citylines
Citylines.co is a collaborative platform for mapping the transit systems of the world!
Stars: ✭ 53 (+51.43%)
Mutual labels:  transport
kubemq-Java
Java client library for KubeMQ server
Stars: ✭ 25 (-28.57%)
Mutual labels:  message-queue
aioconnectors
Simple secure asynchronous message queue
Stars: ✭ 17 (-51.43%)
Mutual labels:  message-queue
java-crud-api
No description or website provided.
Stars: ✭ 24 (-31.43%)
Mutual labels:  sql-server
linper
Linux Persistence Toolkit
Stars: ✭ 20 (-42.86%)
Mutual labels:  persistence
SchemaMapper
A .NET class library that allows you to import data from different sources into a unified destination
Stars: ✭ 41 (+17.14%)
Mutual labels:  sql-server
uzbekistan-regions-data
Full Database of regions Uzbekistan available in JSON, SQL & CSV Format All Regions, Districts & Quarters with Latin, Cyrillic and Russian versions. (Районы (туманы) Республики Узбекистан и Города областного (республиканского) подчинения)
Stars: ✭ 46 (+31.43%)
Mutual labels:  sql-server
dbaTDPMon
dbaTDPMon - Troubleshoot Database Performance and Monitoring
Stars: ✭ 20 (-42.86%)
Mutual labels:  sql-server
oopt-tai
TIP OOPT - Transponder Abstraction Interface
Stars: ✭ 44 (+25.71%)
Mutual labels:  transport

Rebus.SqlServer

install from nuget

Provides Microsoft SQL Server implementations for Rebus for

  • transport
  • sagas
  • subscriptions
  • timeouts
  • saga snapshots


Which versions of SQL Server are supported?

Rebus' SQL package requires at least Microsoft SQL Server 2008.

A word of caution regarding the SQL transport

Microsoft SQL Server is a relational database and not a queueing system.

While it does provide the necessary mechanisms to implement queues, it's not optimized for the type of operations required to implement high-performance queues.

Therefore, please only use the SQL transport if your requirements are fairly modest (and what that means in practice probably depends a lot on the hardware available to you).

Configuration examples

The Rebus configuration spell goes either

services.AddRebus(configure => configure.(...));

or

Configure.With(...)
	.(...)
	.Start();

depending on whether you're using Microsoft DI or some other IoC container.

The following configuration examples will use the Microsoft DI-style of configuration, but the use of Rebus' configuration extensions is the same regardless of which type of configuration you are using, so it should be fairly easy to convert to the style you need.

Transport

Rebus only really requires one part of its configuration: A configuration of the "transport" (i.e. which queueing system, you're going to use).

The SQL transport is not recommended for heavier workloads, but it can be fine in cases where you do not require a super-high throughput. Here's how to configure it (in this case using the name queue-name as the name of the instance's input queue):

services.AddRebus(
	configure => configure
		.Transport(t => t.UseSqlServer(connectionString, "queue-name"))
);

Sagas

To configure Rebus to store sagas in SQL Server, you can do it like this (using the table 'Sagas' for the saga data, and 'SagaIndex' for the corresponding correlation properties):

services.AddRebus(
	configure => configure
		.(...)
		.Sagas(t => t.StoreInSqlServer(connectionString, "Sagas", "SagaIndex"))
);

Subscriptions

To configure Rebus to store subscriptions in SQL Server, you can do it like this (using the table 'Subscriptions'):

services.AddRebus(
	configure => configure
		.(...)
		.Subscriptions(t => t.StoreInSqlServer(connectionString, "Subscriptions", isCentralized: true))
);

Please note the use of isCentralized: true – it indicates that the subscription storage is "centralized", meaning that both subscribers and publishers use the same storage.

If you use the isCentralized: false option, then subscribers need to know the queue names of the publishers of the events they want to subscribe to, and then they will subscribe by sending a message to the publisher.

Using isCentralized: true makes the most sense in most scenarios, as it's easier to work with.

Timeouts

If you're using a transport that does not natively support "timeouts" (also known as "deferred messages", or "messages sent into the future" 🙂), you can configure one of your Rebus instances to function as a "timeout manager". The timeout manager must have some kind of timeout storage configured, and you can use SQL Server to do that.

You configure it like this (here using RabbitMQ as the transport):

services.AddRebus(
	configure => configure
		.Transport(t => t.UseRabbitMq(connectionString, "timeout_manager"))
		.Timeouts(t => t.StoreInSqlServer(connectionString, "Timeouts"))
);

In most cases, it can be super nice to simply configure one single timeout manager with a globally known queue name (e.g. "timeout_manager") and then make use of it from all other Rebus instances by configuring them to use the timeout manager for deferred messages:

services.AddRebus(
	configure => configure
		.Transport(t => t.UseRabbitMq(connectionString, "another-eueue"))
		.Timeouts(t => t.UseExternalTimeoutManager("timeout_manager"))
);

This will cause someMessage to be sent to the timeout manager when you await bus.Defer(TimeSpan.FromMinutes(5), someMessage), which will store it in its timeouts database for 5 minutes before sending it to whoever was configured as the recipient of someMessage.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].