Microsoft Azure Service Bus is a reliable information delivery service in the cloud. Redakt offers Azure Service Bus integration through a NuGet package.

Installation

The Azure Service Bus module is part of the Azure provider package. Install the package with the NuGet package manager or the Package Manager Console.

PM> Install-Package Redakt.Providers.Azure

Service registration

Register Azure Service Bus module services in the ConfigureServices() method of your project's Startup.cs file by adding an AddAzureServiceBus() call to the Redakt builder instance. The order in which services are added to the Redakt builder is not important.

public void ConfigureServices(IServiceCollection services)
{
    // ... framework and other services here

    var builder = services.AddRedakt();
    builder.AddAzureServiceBus();  // Optionally pass Action<AzureServiceBusOptions> parameter.
    // ... other Redakt services
}

Configuration settings

The Azure Service Bus is configured through the appsettings.json file. Any configuration that is not included in the appsettings.json file will be set to its default values. See the example below.

{
    "Redakt": {
        "ServiceBus": {
            "AzureServiceBus": {
                "ConnectionString": "<your service bus connection string>",
                "TopicName": "Redakt"
            }
        }
    }
}

Additionally, an Action<AzureServiceBusOptions> configuration delegate may be passed to the AddAzureServiceBus() call. Configuration set through this delegate takes priority and overrides values in the appsettings.json file.

Connection String

Required. Sets the connecting string that will be used to connect to your Azure Service Bus namespace, which can be found in the Azure Portal. See here for more information on creating a service namespace.

Topic Name

Sets the name of the topic that Redakt will send and subscribe to. The topic will be automatically created by Redakt if it does not already exist. Defaults to "Redakt".