Add Azure event provider to .NET Core application
Add and configure the Azure event provider to distribute events through Azure Service Bus in a load-balanced Optimizely CMS 13 environment.
The Azure event provider distributes events across load-balanced Optimizely Content Management System (CMS) 13 instances through Azure Service Bus. Use it to keep caches, content, and configuration in sync without managing server or network details.
NoteAdd the
EPiServer.Azurepackage to your solution. This package provides theAddAzureEventProviderextension method on theIServiceCollectioninterface.
Register the Azure event provider in Startup.cs and supply your Service Bus connection details. The following example shows the required configuration:
using Microsoft.Extensions.DependencyInjection;
using EPiServer.DependencyInjection;
using System;
namespace SampleBlob;
public class Startup {
public void ConfigureServices(IServiceCollection services)
{
services.AddAzureEventProvider(o => {
o.ConnectionString = "AZURE_EVENT_CONNECTION_STRING";
o.TopicName = "TOPIC_NAME";
o.SubscriptionName = "SUBSCRIPTION_NAME";
});
}
}
NoteThis article does not apply to Optimizely Digital Experience Platform (DXP) CMS 12.
For DXP with CMS 12, follow the steps in Create and deploy a CMS site. Use the
EPiServer.CloudPlatform.Cmspackage and the associated startup code to connect to the event system in Azure.
Updated 19 days ago
