From be23a7d42ec23f986bb9d628d8b51e7eff77b9c6 Mon Sep 17 00:00:00 2001 From: Savorboard Date: Thu, 14 Mar 2019 16:11:28 +0800 Subject: [PATCH] Switch the Marketing Api event store to in-memory storage because CAP requires MongoDB version to be larger than 4.0 and enable clustering to use the local storage transaction provided by MongoDB --- src/Services/Marketing/Marketing.API/Marketing.API.csproj | 2 +- src/Services/Marketing/Marketing.API/Startup.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj index bd457104d..64e006409 100644 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index 8c1822bec..88e0055d1 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -79,12 +79,7 @@ services.AddCap(options => { - // using MongoDB as the event storage - options.UseMongoDB(configure => - { - configure.DatabaseConnection = Configuration["MongoConnectionString"]; - configure.DatabaseName = Configuration["MongoDatabase"]; - }); + options.UseInMemoryStorage(); if (Configuration.GetValue("AzureServiceBusEnabled")) {