HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

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.

📘

Note

Add the EPiServer.Azure package to your solution. This package provides the AddAzureEventProvider extension method on the IServiceCollection interface.

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";
    });
  }
}
📘

Note

This 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.Cms package and the associated startup code to connect to the event system in Azure.