ServiceBusEmulatorConfig.Web 1.1.0

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

Tools to work efficiently with the Azure Service Bus [Emulator] (Work in progress)

Features

  • Convert Azure Service Bus Namespace ARM template to Azure Service Bus emulator configuration.
  • Inspect Azure Service Bus Namespace
    • See Topic, subscriptions and rules
    • See Queues

Next features

  • Peak messages
  • Send messages

The tool

Install the NuGet.org version as: $ dotnet tool install --global ServiceBusEmulatorConfig.Cli, it is invoked by $ sbconfig.

Install, or update, from source:

  1. $ pushd ServiceBusEmulatorConfig.Cli
  2. $ dotnet pack -c Release -p:PackageVersion 1.0.1
  3. $ dotnet tool install -g SerbiceBusEumlatorConfig.Cli --add-source nupkg/

ARM to emulator config

The ARM template must be manually downloaded or compiled using $ az bicep build --file <bicep.bicep>

$ sbconfig transform --help
Description:
  Transform Azure Service Bus ARM template to Emulator config

Usage:
  ServiceBusEmulatorConfig.Cli transform [options]

Options:
  -i, --input <input> (REQUIRED)    Path to the ARM template JSON file
  -o, --output <output> (REQUIRED)  Path to save the generated emulator config file
  -n, --namespace <namespace>       The namespace name to use in the emulator config [default: sbemulatorns]
  -?, -h, --help                    Show help and usage information
Aspire usage

Mount the config file:

var serviceBus = builder
    .AddAzureServiceBus("esb")
    .RunAsEmulator(em =>
    {
        em.WithBindMount("Config.json", "/ServiceBus_Emulator/ConfigFiles/Config.json");
    });

NB: This runs as docker, so the Config.json must be at the root, or below, of the Aspire project.

Docker usage

Given the example from Microsoft, specify the path to the outputted Config.json in the .env file. Remember, rhis runs as docker, so the Config.json must be at the root, or below, of the Aspire project.

Inspect Azure Service Bus Namespace

Until Azure/azure-service-bus-emulator-installer/issues/17 have been resolved, we cannot use the explorer (or any viwer) for the emulator...

But the explorer is cross platform, and can be launched as $ sbconfig explorer.

This launched as local web api and the explorer is simply a webinterface - crossplatform without hazzle 😃

For now, the repo must be cloned and executed manually.

Contribute

Feel free to open an issue or PR! 🚀

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.1.0 132 5/24/2025
0.0.1-rc.1 82 5/24/2025