DotNetBrightener.Plugins.EventPubSub.AzureServiceBus 2025.0.2

dotnet add package DotNetBrightener.Plugins.EventPubSub.AzureServiceBus --version 2025.0.2                
NuGet\Install-Package DotNetBrightener.Plugins.EventPubSub.AzureServiceBus -Version 2025.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="DotNetBrightener.Plugins.EventPubSub.AzureServiceBus" Version="2025.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetBrightener.Plugins.EventPubSub.AzureServiceBus --version 2025.0.2                
#r "nuget: DotNetBrightener.Plugins.EventPubSub.AzureServiceBus, 2025.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.
// Install DotNetBrightener.Plugins.EventPubSub.AzureServiceBus as a Cake Addin
#addin nuget:?package=DotNetBrightener.Plugins.EventPubSub.AzureServiceBus&version=2025.0.2

// Install DotNetBrightener.Plugins.EventPubSub.AzureServiceBus as a Cake Tool
#tool nuget:?package=DotNetBrightener.Plugins.EventPubSub.AzureServiceBus&version=2025.0.2                

Azure Service Bus Integration for Event PubSub Library

© 2024 DotNet Brightener

Versions

Library Version
EventPubSub Core NuGet Version
EventPubSub Distributed Library NuGet Version
Dependency Injection Library NuGet Version
Azure Service Bus Integration Library NuGet Version
RabbitMq Integration Library NuGet Version

Installation

dotnet package add DotNetBrightener.Plugins.EventPubSub
dotnet package add DotNetBrightener.Plugins.EventPubSub.DependencyInjection
dotnet package add DotNetBrightener.Plugins.EventPubSub.Distributed
dotnet package add DotNetBrightener.Plugins.EventPubSub.AzureServiceBus
# or 
dotnet add package DotNetBrightener.Plugins.EventPubSub.RabbitMq

Usage

Configuration

Option 1: Use IConfiguration to configure the service bus

// Initialize EventPubSubService
var eventPubSubConfig = builder.Services
                               .AddEventPubSubService()
                                // scan for event messages in the given assembly
                               .AddEventMessagesFromAssemblies(typeof(DistributedTestMessage).Assembly)
                                // scan for event handlers in the given assembly
                               .AddEventHandlersFromAssemblies(Assembly.GetExecutingAssembly());

// Add Azure Service Bus
eventPubSubConfig.UseAzureServiceBus(builder.Configuration)
                 .Finalize();

In your appsettings.json file, add the the following configuration:

  "ServiceBusConfiguration": {
    "ConnectionString": "<your-endpoint-to-azure-service-bus>",
    "SubscriptionName": "<application-name>",
    "IncludeNamespaceForTopicName": false
  }
Option 2: Configure from code

// Initialize EventPubSubService
var eventPubSubConfig = builder.Services
                               .AddEventPubSubService()
                                // scan for event messages in the given assembly
                               .AddEventMessagesFromAssemblies(Assembly.GetExecutingAssembly(), typeof(DistributedTestMessage).Assembly)
                                // scan for event handlers in the given assembly
                               .AddEventHandlersFromAssemblies(Assembly.GetExecutingAssembly());

var distributedIntegrations = eventPubSubConfig.EnableDistributedIntegrations();

distributedIntegrations.SetSubscriptionName("<application-name>");
// if you want to exclude namespace in entity name
distributedIntegrations.ExcludeNamespaceInEntityName();

// Add Azure Service Bus
distributedIntegrations.UseAzureServiceBus("<azure-connection-string>");

// this should be called before builder.Build(), or before exiting ConfigureServices method
distributedIntegrations.Finalize();

Refer to the Event PubSub Library, MassTransit Integration Library for more details on how to configure the event messages, request/response messages and how to implement handlers for them.

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. 
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
2025.0.2 74 1/21/2025
2025.0.2-preview-278 54 1/21/2025
2025.0.2-preview-277 82 12/16/2024
2025.0.1-rc-243301701 238 11/25/2024
2024.0.14.6 104 11/25/2024
2024.0.14.6-rc-243031001 158 10/29/2024
2024.0.14.6-rc-243030701 91 10/29/2024
2024.0.14.6-rc-242840501 84 10/10/2024
2024.0.14.6-rc-242820305 83 10/8/2024
2024.0.14.6-rc-242771401 183 10/3/2024
2024.0.14.6-rc-242770501 86 10/3/2024
2024.0.14.6-rc-242770201 100 10/3/2024
2024.0.14.6-rc-242761801 83 10/2/2024
2024.0.14.6-rc-242761601 97 10/2/2024
2024.0.14.6-rc-242761501 89 10/2/2024
2024.0.14.6-rc-242761401 101 10/2/2024
2024.0.14.6-rc-242760701 106 10/2/2024
2024.0.14.6-rc-242751002 85 10/1/2024
2024.0.14.6-rc-242750901 101 10/1/2024
2024.0.14.6-rc-242750502 99 10/1/2024
2024.0.14.6-rc-242750201 87 10/1/2024
2024.0.14.6-rc-242741501 82 9/30/2024
2024.0.14.6-rc-242730701 112 9/29/2024
2024.0.14.6-preview-2730501 74 9/29/2024
2024.0.14.6-preview-2701501 114 9/26/2024
2024.0.14.6-preview-2620901 133 9/18/2024
2024.0.14.6-preview-2570701 96 9/13/2024
2024.0.14.6-preview-2510703 144 9/7/2024
2024.0.14.6-preview-2480501 101 9/4/2024
2024.0.14.6-preview-2430401 115 8/30/2024
2024.0.14.6-preview-242730701 76 9/29/2024
2024.0.14.6-preview-2421703 87 8/29/2024
2024.0.14.6-preview-2421701 85 8/29/2024
2024.0.14.6-preview-2420901 85 8/29/2024
2024.0.14.6-preview-2390101 93 8/26/2024
2024.0.14.6-preview-2381603 110 8/25/2024
2024.0.14.6-preview-2341601 131 8/21/2024
2024.0.14.6-preview-2321602 113 8/20/2024
2024.0.14.6-preview-2190801 116 8/6/2024
2024.0.14.6-preview-2041501 99 7/22/2024
2024.0.14.6-preview-1920603 155 7/10/2024
2024.0.14.6-preview-1920301 94 7/10/2024
2024.0.14.6-preview-1911302 104 7/9/2024
2024.0.14.6-preview-1901001 115 7/8/2024
2024.0.14.6-preview-1900901 100 7/8/2024
2024.0.14.6-preview-1900801 93 7/8/2024
2024.0.14.6-preview-1860304 98 7/4/2024
2024.0.14.5 155 7/1/2024
2024.0.14.5-preview-1811601 94 6/29/2024
2024.0.14.5-preview-1810501 114 6/29/2024
2024.0.14.5-preview-180132 100 6/28/2024
2024.0.14.5-preview-180131 102 6/28/2024
2024.0.14.5-preview-180121 87 6/28/2024
2024.0.14.4 114 6/27/2024
2024.0.14.4-preview-7 91 6/27/2024
2024.0.14.3 114 6/21/2024
2024.0.14.1 112 6/6/2024
2024.0.14.1-preview 88 6/6/2024
2024.0.14-preview-1 94 6/6/2024
2024.0.13.8-preview 111 6/6/2024
2024.0.13.1-preview-0146 112 6/6/2024
2024.0.12.15803-preview-03 98 6/6/2024
2024.0.12.15608 108 6/4/2024
2024.0.12.15515 190 6/3/2024
2024.0.12.15220 99 5/31/2024
2024.0.12.15220-alpha31-240... 91 5/31/2024
2024.0.12.14911 151 5/28/2024
2024.0.12.14910-alpha28-240... 102 5/28/2024
2024.0.12.14823 139 5/27/2024
2024.0.12.14522-alpha7-2405... 109 5/24/2024
2024.0.12.14514-alpha6-2405... 104 5/24/2024
2024.0.12.14511 126 5/24/2024
2024.0.12.14314 165 5/22/2024
2024.0.12.14114 160 5/20/2024