DotNetBrightener.Plugins.EventPubSub.AzureServiceBus
                               
                            
                                2025.0.3-preview-288
                            
                        
                    
        
        
                                This is a prerelease version of DotNetBrightener.Plugins.EventPubSub.AzureServiceBus.
                            
    
    
        
        
                                There is a newer version of this package available.
                                
See the version list below for details.
                    See the version list below for details.
dotnet add package DotNetBrightener.Plugins.EventPubSub.AzureServiceBus --version 2025.0.3-preview-288
NuGet\Install-Package DotNetBrightener.Plugins.EventPubSub.AzureServiceBus -Version 2025.0.3-preview-288
        
        
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.3-preview-288" />
        
        
For projects that support PackageReference, copy this XML node into the project file to reference the package.
                    
    
    <PackageVersion Include="DotNetBrightener.Plugins.EventPubSub.AzureServiceBus" Version="2025.0.3-preview-288" />
<PackageReference Include="DotNetBrightener.Plugins.EventPubSub.AzureServiceBus" />
        
        
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 DotNetBrightener.Plugins.EventPubSub.AzureServiceBus --version 2025.0.3-preview-288
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    #r "nuget: DotNetBrightener.Plugins.EventPubSub.AzureServiceBus, 2025.0.3-preview-288"
        
        
#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 DotNetBrightener.Plugins.EventPubSub.AzureServiceBus@2025.0.3-preview-288
        
        
#: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=DotNetBrightener.Plugins.EventPubSub.AzureServiceBus&version=2025.0.3-preview-288&prerelease
#tool nuget:?package=DotNetBrightener.Plugins.EventPubSub.AzureServiceBus&version=2025.0.3-preview-288&prerelease
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    Azure Service Bus Integration for Event PubSub Library
© 2024 DotNet Brightener
Versions
| Library | Version | 
|---|---|
| EventPubSub Core | |
| EventPubSub Distributed Library | |
| Dependency Injection Library | |
| Azure Service Bus Integration Library | |
| RabbitMq Integration Library | 
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 | Versions 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.
- 
                                                    net9.0- DotNetBrightener.Plugins.EventPubSub.Distributed (>= 2025.0.3-preview-288)
- MassTransit.Azure.ServiceBus.Core (>= 8.3.6)
- MassTransit.Newtonsoft (>= 8.3.6)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.1)
 
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.