Shuttle.Hopper.SqlServer.Subscription 21.0.2

Prefix Reserved
dotnet add package Shuttle.Hopper.SqlServer.Subscription --version 21.0.2
                    
NuGet\Install-Package Shuttle.Hopper.SqlServer.Subscription -Version 21.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shuttle.Hopper.SqlServer.Subscription" Version="21.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shuttle.Hopper.SqlServer.Subscription" Version="21.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Shuttle.Hopper.SqlServer.Subscription" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Shuttle.Hopper.SqlServer.Subscription --version 21.0.2
                    
#r "nuget: Shuttle.Hopper.SqlServer.Subscription, 21.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Shuttle.Hopper.SqlServer.Subscription@21.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Shuttle.Hopper.SqlServer.Subscription&version=21.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Shuttle.Hopper.SqlServer.Subscription&version=21.0.2
                    
Install as a Cake Tool

Shuttle.Hopper.SqlServer.Subscription

Sql Server storage of subscriptions for use with Shuttle.Hopper.

The implementation will automatically create the required database schema and tables if they are missing. The identity used to connect to the database must have sufficient permissions to create schemas and tables.

Installation

dotnet add package Shuttle.Hopper.SqlServer.Subscription

Configuration

Configure both the Hopper options (inbox URI and subscription message types) and the Sql Server subscription options:

services
    .AddHopper(options =>
    {
        options.Inbox.WorkTransportUri = new Uri("queue://./inbox");
        options.Subscription.MessageTypes = new[] { typeof(MyMessage).FullName! };
    })
    .UseSqlServerSubscription(options =>
    {
        options.ConnectionString = "server=.;database=shuttle;user id=sa;password=Pass!000";
    });

Subscription Modes

The SubscriptionMode option controls how missing subscriptions are handled:

Mode Behavior
Standard Registers the subscriber for all configured message types (default)
Disabled Skips subscription registration entirely
FailWhenMissing Throws ApplicationException if any configured message type is not already subscribed
options.Subscription.Mode = SubscriptionMode.FailWhenMissing;

JSON Configuration

The default JSON settings structure is as follows:

{
  "Shuttle": {
    "SqlServer": {
      "Subscription": {
        "ConnectionString": "connection-string",
        "Schema": "dbo",
        "ConfigureDatabase": true
      }
    }
  }
}

Options

Option Default Description
ConnectionString (required) The connection string to use for the Sql Server database. Validated at startup.
Schema dbo The schema to use for the subscription tables. Must be a valid SQL identifier matching pattern ^[a-zA-Z_][a-zA-Z0-9_]*$.
ConfigureDatabase true A boolean value indicating whether the database schema and tables should be created if they don't exist.

Database Schema

When ConfigureDatabase is true, the following objects are created automatically using a distributed lock to ensure thread-safe creation:

  • Schema: As specified by the Schema option (default: dbo)
  • Table: SubscriberMessageType with the following structure:
Column Type Constraints
MessageType varchar(250) NOT NULL, part of PRIMARY KEY
InboxWorkQueueUri varchar(250) NOT NULL, part of PRIMARY KEY

Key Requirements

  1. HopperOptions.Inbox.WorkTransportUri must be set before subscription registration
  2. At least one message type must be configured in HopperOptions.Subscription.MessageTypes
  3. The ConnectionString option is mandatory and validated at startup
  4. The Schema option is mandatory and must be a valid SQL identifier

How It Works

The SubscriptionObserver is automatically added to the StartupPipeline during application initialization. When the application starts, it:

  1. Creates the database schema and SubscriberMessageType table if ConfigureDatabase is true
  2. Registers subscriptions for all configured message types based on the SubscriptionMode
  3. Publishers use ISubscriptionQuery.GetSubscribedUrisAsync(messageType) to find all subscriber URIs for a given message type
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
21.0.2 119 4/17/2026
21.0.1 101 4/15/2026
21.0.1-rc3 98 4/11/2026
21.0.1-rc2 110 3/21/2026
21.0.1-rc1 102 2/28/2026
21.0.1-beta 112 2/7/2026
21.0.0-alpha 109 1/18/2026