HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

How to add Azure Event Provider to your .NET Core application

This topic describes how to use an event provider that uses Azure Service Bus as the transport mechanism.

πŸ“˜

Note

You need to add the EPiServer.Azure package to your solution, which has the extension methods on the IServiceCollection interface.

The following example shows how to add the Azure Event Provider to a Content Cloud application.

using Microsoft.Extensions.DependencyInjection;
using System;
    
namespace SampleBlob
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddAzureEventProvider(o =>
            {
                o.ConnectionString = "{The Azure event connection string}";
                o.TopicName = "{The topic name}";
                o.SubscriptionName = "{Subscription name}"; // Set to the local machine name if not set
            });
        }
    }
}

Did this page help you?