Soenneker.ServiceBus.Admin 11.0.1732

Prefix Reserved
dotnet add package Soenneker.ServiceBus.Admin --version 11.0.1732
                    
NuGet\Install-Package Soenneker.ServiceBus.Admin -Version 11.0.1732
                    
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="Soenneker.ServiceBus.Admin" Version="11.0.1732" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.ServiceBus.Admin" Version="11.0.1732" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.ServiceBus.Admin" />
                    
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 Soenneker.ServiceBus.Admin --version 11.0.1732
                    
#r "nuget: Soenneker.ServiceBus.Admin, 11.0.1732"
                    
#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 Soenneker.ServiceBus.Admin@11.0.1732
                    
#: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=Soenneker.ServiceBus.Admin&version=11.0.1732
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.ServiceBus.Admin&version=11.0.1732
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.ServiceBus.Admin

A lazily initialized, dependency-injection-friendly ServiceBusAdministrationClient for Azure Service Bus entity management.

Installation

dotnet add package Soenneker.ServiceBus.Admin

Configuration

Provide the Service Bus connection string at Azure:ServiceBus:ConnectionString:

{
  "Azure": {
    "ServiceBus": {
      "ConnectionString": "Endpoint=sb://..."
    }
  }
}

Keep the connection string in a protected configuration provider rather than source control or client-visible configuration. Its credential must allow the administration operations your application performs.

Registration

using Soenneker.ServiceBus.Admin.Registrars;

services.AddServiceBusAdminUtilAsSingleton();

The client is created on the first Get call and reused until the service is disposed.

AddServiceBusAdminUtilAsScoped() exists, but this package's implementation currently registers the service as a singleton as well. Use AddServiceBusAdminUtilAsSingleton() when you want the lifetime to be unambiguous.

Usage

Inject IServiceBusAdminUtil, obtain the Azure SDK client, and use its administration APIs directly:

using Azure.Messaging.ServiceBus.Administration;
using Soenneker.ServiceBus.Admin.Abstract;

public sealed class QueueProvisioner(IServiceBusAdminUtil adminUtil)
{
    public async Task EnsureQueue(CancellationToken cancellationToken)
    {
        ServiceBusAdministrationClient admin =
            await adminUtil.Get(cancellationToken);

        if (!(await admin.QueueExistsAsync("orders", cancellationToken)).Value)
        {
            await admin.CreateQueueAsync(
                new CreateQueueOptions("orders")
                {
                    MaxDeliveryCount = 10
                },
                cancellationToken);
        }
    }
}

The utility does not create queues, topics, subscriptions, or rules automatically. It only owns and reuses the configured administration client.

The Azure SDK client is safe to reuse. Do not dispose the object returned by Get; its lifetime belongs to IServiceBusAdminUtil and the DI container.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.ServiceBus.Admin:

Package Downloads
Soenneker.ServiceBus.Queue

A utility library for Azure Service queue operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1732 661 11/11/2026
11.0.1731 256 11/11/2026
11.0.1730 196 11/11/2026
11.0.1729 68 11/11/2026
11.0.1728 82 11/11/2026
11.0.1727 270 11/10/2026
11.0.1726 76 11/10/2026
11.0.1725 2,149 11/3/2026
11.0.1724 1,137 10/27/2026
11.0.1723 569 10/26/2026
11.0.1722 246 10/26/2026
11.0.1721 197 10/26/2026
11.0.1720 314 10/26/2026
11.0.1719 341 10/26/2026
4.0.1718 414 10/26/2026
4.0.1717 105 10/25/2026
4.0.1716 1,489 10/15/2026
4.0.1715 125 10/15/2026
4.0.1714 103 10/15/2026
4.0.1712 139 10/14/2026
Loading failed

Updated Soenneker.Utils.AsyncSingleton to 11.0.893