From f88d694f4e1aef445dc61d0fa930dcb64b3e02b5 Mon Sep 17 00:00:00 2001
From: fraliv13 <5892139+fraliv13@users.noreply.github.com>
Date: Tue, 19 Jan 2021 15:19:17 +0200
Subject: [PATCH] NBB refactor messaging data contracts, process manager state,
cleanup unused features (#112)
* Removed EventStoreHost and GetEventStore
* Removed SerializedMessage, IMessage
* Removed NBB.Resiliency project
* Moved resiliency policies to messaging host
* Process manager state refactoring
* Moved messaging data contracts to MessagingAbstractions
---
NBB.EventStore.slnf | 7 +-
NBB.Messaging.slnf | 1 -
NBB.sln | 38 ------
.../NBB.Contracts.Application.Commands.csproj | 1 -
.../NBB.Contracts.PublishedLanguage.csproj | 1 -
.../NBB.Contracts.Worker.csproj | 1 -
.../NBB.Contracts.Worker/Program.cs | 3 -
.../NBB.Invoices.Application.Commands.csproj | 1 -
.../NBB.Invoices.PublishedLanguage.csproj | 1 -
.../NBB.Invoices.Worker/Program.cs | 3 -
.../NBB.Payments.Application.Commands.csproj | 1 -
.../NBB.Payments.PublishedLanguage.csproj | 1 -
.../NBB.Payments.Worker/Program.cs | 3 -
samples/Monolith/NBB.Mono/Startup.cs | 3 -
.../SubscriberLoggingMiddleware.cs | 2 +-
.../OrderProcessManager.cs | 7 +-
.../OrderProcessManagerData.cs | 6 +-
.../ProcessManagerSample.csproj | 1 -
.../ProcessManagerSample/Program.cs | 2 +-
.../ProcessManagerSample/Startup.cs | 3 -
.../NBB.Application.MediatR.csproj | 1 -
src/Core/NBB.Core.Abstractions/SetOnce.cs | 31 -----
.../EventStoreHostBuilder.cs | 40 ------
.../EventStoreSubscriberService.cs | 47 -------
.../NBB.EventStore.Host.csproj | 22 ----
.../Pipeline/DefaultResiliencyMiddleware.cs | 48 -------
.../Pipeline/EventPipelineExtensions.cs | 20 ---
.../Pipeline/ExceptionHandlingMiddleware.cs | 46 -------
.../Pipeline/MediatRMiddleware.cs | 29 -----
.../ServiceCollectionExtensions.cs | 12 --
.../DependencyInjectionExtensions.cs | 18 ---
.../NBB.GetEventStore/GetEventStoreClient.cs | 100 --------------
.../GetEventStoreSubscriber.cs | 89 -------------
.../Internal/EventMetadata.cs | 34 -----
.../NBB.GetEventStore/Internal/ISerDes.cs | 12 --
.../NBB.GetEventStore/Internal/SerDes.cs | 32 -----
.../NBB.GetEventStore.csproj | 26 ----
.../DefaultMessageTypeRegistry.cs | 1 -
.../DefaultTopicRegistry.cs | 1 -
.../IMessageBusPublisher.cs | 21 ++-
.../IMessageBusSubscriber.cs | 3 +-
.../IMessageSerDes.cs | 20 ++-
.../MessageBusPublisher.cs | 4 +-
.../MessageBusSubscriber.cs | 1 -
.../MessageTypeIdAttribute.cs | 2 +-
.../MessagingContext.cs | 4 +-
.../MessagingEnvelope.cs | 2 +-
.../MessagingEnvelopeExtensions.cs | 3 +-
.../NBB.Messaging.Abstractions.csproj | 3 +-
.../NewtonsoftJsonMessageSerDes.cs | 1 -
.../TopicNameAttribute.cs | 2 +-
.../TopicNameResolverAttribute.cs | 2 +-
.../NBB.Messaging.DataContracts/IMessage.cs | 6 -
.../NBB.Messaging.DataContracts.csproj | 28 ----
.../SerializedMessage.cs | 25 ----
.../Builder/MessagingHostBuilder.cs | 2 +-
.../MessageBusSubscriberService.cs | 3 +-
.../MessagingContextBusPublisherDecorator.cs | 1 -
.../CorrelationMiddleware.cs | 1 -
.../DefaultResiliencyMiddleware.cs | 43 +++---
.../ExceptionHandlingMiddleware.cs | 2 +-
.../MessagingPipeline/MediatRMiddleware.cs | 2 +-
.../MessagingPipelineExtensions.cs | 2 +-
.../MessagingTopicSubscriberService.cs | 1 -
.../NBB.Messaging.Host.csproj | 2 +-
...ultiTenancyMessageBusPublisherDecorator.cs | 1 -
.../TenantMiddleware.cs | 2 +-
.../OpenTracingPublisherDecorator.cs | 1 -
.../Subscriber/MessagingPipelineExtensions.cs | 2 +-
.../Subscriber/OpenTracingMiddleware.cs | 1 -
.../Builder/AbstractDefinition.cs | 3 +-
.../Builder/EventActivitySet.cs | 2 -
.../Builder/EventActivitySetBuilder.cs | 1 -
.../Builder/EventCorrelationBuilder.cs | 3 +-
.../Delegates.cs | 8 +-
.../IDefinition.cs | 1 -
.../InstanceData.cs | 1 -
.../NBB.ProcessManager.Runtime/Instance.cs | 5 +-
.../Persistence/IInstanceDataRepository.cs | 6 +-
.../Persistence/InstanceDataRepository.cs | 4 +-
.../ProcessExecutionCoordinator.cs | 2 +-
.../ProcessManagerNotificationHandler.cs | 2 +-
.../IResiliencyPolicyProvider.cs | 11 --
.../NBB.Resiliency/NBB.Resiliency.csproj | 17 ---
.../ResiliencyPolicyProvider.cs | 31 -----
.../ServiceCollectionExtensions.cs | 12 --
.../EventStoreBenchmark.cs | 30 -----
.../EventStoreBenchmarks.csproj | 2 -
.../EventStoreDBIntegrationTests.cs | 24 ++--
.../EventStoreMessagingIntegrationTests.cs | 117 -----------------
.../NBB.EventStore.IntegrationTests.csproj | 1 -
.../GetEventStoreSubscriberTests.cs | 67 ----------
.../NBB.GetEventStore.Tests.csproj | 27 ----
.../MessageSerDesTests.cs | 1 -
.../MessageTypeRegistryTests.cs | 1 -
.../TopicRegistryTests.cs | 1 -
.../NBB.Messaging.DataContracts.Tests.csproj | 1 -
.../MessageBusSubscriberServceTests.cs | 1 -
.../MessagingHostBuilderTests.cs | 2 -
.../CorrelationMiddlewareTests.cs | 14 +-
.../DefaultResiliencyMiddlewareTests.cs | 98 ++------------
.../ExceptionHandlingMiddlewareTests.cs | 19 +--
.../MediatRMiddlewareTests.cs | 15 ++-
.../MessagingPipelineExtensionsTests.cs | 2 +-
.../MessagingTopicSubscriberServiceTests.cs | 1 -
.../StorageTests.cs | 3 +-
.../MessageBusPublisherDecoratorTests.cs | 1 -
...nantIdHeaderMessagingTokenResolverTests.cs | 1 -
.../ProcessManagerInstanceUnitTests.cs | 122 +++++++-----------
109 files changed, 188 insertions(+), 1360 deletions(-)
delete mode 100644 src/Core/NBB.Core.Abstractions/SetOnce.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/EventStoreHostBuilder.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/EventStoreSubscriberService.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/NBB.EventStore.Host.csproj
delete mode 100644 src/EventStore/NBB.EventStore.Host/Pipeline/DefaultResiliencyMiddleware.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/Pipeline/EventPipelineExtensions.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/Pipeline/ExceptionHandlingMiddleware.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/Pipeline/MediatRMiddleware.cs
delete mode 100644 src/EventStore/NBB.EventStore.Host/ServiceCollectionExtensions.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/DependencyInjectionExtensions.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/GetEventStoreClient.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/GetEventStoreSubscriber.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/Internal/EventMetadata.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/Internal/ISerDes.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/Internal/SerDes.cs
delete mode 100644 src/EventStore/NBB.GetEventStore/NBB.GetEventStore.csproj
rename src/Messaging/{NBB.Messaging.DataContracts => NBB.Messaging.Abstractions}/MessageTypeIdAttribute.cs (83%)
rename src/Messaging/{NBB.Messaging.DataContracts => NBB.Messaging.Abstractions}/MessagingEnvelope.cs (93%)
rename src/Messaging/{NBB.Messaging.DataContracts => NBB.Messaging.Abstractions}/TopicNameAttribute.cs (91%)
rename src/Messaging/{NBB.Messaging.DataContracts => NBB.Messaging.Abstractions}/TopicNameResolverAttribute.cs (86%)
delete mode 100644 src/Messaging/NBB.Messaging.DataContracts/IMessage.cs
delete mode 100644 src/Messaging/NBB.Messaging.DataContracts/NBB.Messaging.DataContracts.csproj
delete mode 100644 src/Messaging/NBB.Messaging.DataContracts/SerializedMessage.cs
delete mode 100644 src/Resiliency/NBB.Resiliency/IResiliencyPolicyProvider.cs
delete mode 100644 src/Resiliency/NBB.Resiliency/NBB.Resiliency.csproj
delete mode 100644 src/Resiliency/NBB.Resiliency/ResiliencyPolicyProvider.cs
delete mode 100644 src/Resiliency/NBB.Resiliency/ServiceCollectionExtensions.cs
delete mode 100644 test/Integration/NBB.EventStore.IntegrationTests/EventStoreMessagingIntegrationTests.cs
delete mode 100644 test/UnitTests/EventStore/NBB.GetEventStore.Tests/GetEventStoreSubscriberTests.cs
delete mode 100644 test/UnitTests/EventStore/NBB.GetEventStore.Tests/NBB.GetEventStore.Tests.csproj
diff --git a/NBB.EventStore.slnf b/NBB.EventStore.slnf
index e9d92639..d6aecc0a 100644
--- a/NBB.EventStore.slnf
+++ b/NBB.EventStore.slnf
@@ -5,17 +5,14 @@
"src\\EventStore\\NBB.EventStore.Abstractions\\NBB.EventStore.Abstractions.csproj",
"src\\EventStore\\NBB.EventStore.AdoNet.Migrations\\NBB.EventStore.AdoNet.Migrations.csproj",
"src\\EventStore\\NBB.EventStore.AdoNet\\NBB.EventStore.AdoNet.csproj",
- "src\\EventStore\\NBB.EventStore.Host\\NBB.EventStore.Host.csproj",
"src\\EventStore\\NBB.EventStore.InMemory\\NBB.EventStore.InMemory.csproj",
"src\\EventStore\\NBB.EventStore.MessagingExtensions\\NBB.EventStore.MessagingExtensions.csproj",
- "src\\EventStore\\NBB.EventStore\\NBB.EventStore.csproj",
- "src\\EventStore\\NBB.GetEventStore\\NBB.GetEventStore.csproj",
+ "src\\EventStore\\NBB.EventStore\\NBB.EventStore.csproj",
"src\\EventStore\\NBB.SQLStreamStore.Migrations\\NBB.SQLStreamStore.Migrations.csproj",
"src\\EventStore\\NBB.SQLStreamStore\\NBB.SQLStreamStore.csproj",
"test\\Integration\\NBB.EventStore.IntegrationTests\\NBB.EventStore.IntegrationTests.csproj",
"test\\UnitTests\\EventStore\\NBB.EventStore.InMemory.Tests\\NBB.EventStore.InMemory.Tests.csproj",
- "test\\UnitTests\\EventStore\\NBB.EventStore.Tests\\NBB.EventStore.Tests.csproj",
- "test\\UnitTests\\EventStore\\NBB.GetEventStore.Tests\\NBB.GetEventStore.Tests.csproj"
+ "test\\UnitTests\\EventStore\\NBB.EventStore.Tests\\NBB.EventStore.Tests.csproj"
]
}
}
\ No newline at end of file
diff --git a/NBB.Messaging.slnf b/NBB.Messaging.slnf
index 7d1d24a8..3cb77991 100644
--- a/NBB.Messaging.slnf
+++ b/NBB.Messaging.slnf
@@ -3,7 +3,6 @@
"path": "NBB.sln",
"projects": [
"src\\Messaging\\NBB.Messaging.Abstractions\\NBB.Messaging.Abstractions.csproj",
- "src\\Messaging\\NBB.Messaging.DataContracts\\NBB.Messaging.DataContracts.csproj",
"src\\Messaging\\NBB.Messaging.Effects\\NBB.Messaging.Effects.csproj",
"src\\Messaging\\NBB.Messaging.Host\\NBB.Messaging.Host.csproj",
"src\\Messaging\\NBB.Messaging.InProcessMessaging\\NBB.Messaging.InProcessMessaging.csproj",
diff --git a/NBB.sln b/NBB.sln
index 6176ec15..ee3a2895 100644
--- a/NBB.sln
+++ b/NBB.sln
@@ -102,8 +102,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{14726095-D
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Core.Abstractions", "src\Core\NBB.Core.Abstractions\NBB.Core.Abstractions.csproj", "{2F591414-63E0-4CD8-AA1E-11132CC20EA9}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.DataContracts", "src\Messaging\NBB.Messaging.DataContracts\NBB.Messaging.DataContracts.csproj", "{602F852F-77EE-4335-BA45-170C32440575}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EventStore", "EventStore", "{20C8482D-1525-47B0-B78B-09632892E8E4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.EventStore.Abstractions", "src\EventStore\NBB.EventStore.Abstractions\NBB.EventStore.Abstractions.csproj", "{7197E4CE-120D-4601-AA8B-F65B8DB2E883}"
@@ -124,8 +122,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.Nats", "src\M
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.Abstractions.Tests", "test\UnitTests\Messaging\NBB.Messaging.Abstractions.Tests\NBB.Messaging.Abstractions.Tests.csproj", "{65743F60-F511-41E1-959B-D29FA3DB404D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.GetEventStore", "src\EventStore\NBB.GetEventStore\NBB.GetEventStore.csproj", "{86A0DCDE-225B-4140-8195-A96F744573F0}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Monolith", "Monolith", "{34929B8F-4ED5-499C-A3AC-7ABE0F2F8FFE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Mono", "samples\Monolith\NBB.Mono\NBB.Mono.csproj", "{34A864A3-C25C-4DFA-BCE8-173F72B572A3}"
@@ -134,8 +130,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.InProcessMess
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.InProcessMessaging.Tests", "test\UnitTests\Messaging\NBB.Messaging.InProcessMessaging.Tests\NBB.Messaging.InProcessMessaging.Tests.csproj", "{2E99F025-BDC0-430E-AD2A-C81141AC2BCA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.GetEventStore.Tests", "test\UnitTests\EventStore\NBB.GetEventStore.Tests\NBB.GetEventStore.Tests.csproj", "{4831DD42-C73B-47DE-B5F6-9701F9773AD0}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.SQLStreamStore", "src\EventStore\NBB.SQLStreamStore\NBB.SQLStreamStore.csproj", "{88B831EC-0DFE-40D7-9449-C4BDAE5B5512}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.SQLStreamStore.Migrations", "src\EventStore\NBB.SQLStreamStore.Migrations\NBB.SQLStreamStore.Migrations.csproj", "{FC77C6B6-EAB3-4CC0-8BB0-535BC4CB2C5B}"
@@ -182,12 +176,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Core.DependencyInjectio
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.Host", "src\Messaging\NBB.Messaging.Host\NBB.Messaging.Host.csproj", "{B15B9803-EB9D-4BA2-9B09-ACAE8F11252D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.EventStore.Host", "src\EventStore\NBB.EventStore.Host\NBB.EventStore.Host.csproj", "{6CBD9972-ABB1-4E15-8FB7-8F377A081490}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resiliency", "Resiliency", "{A6E20C85-DEC2-4540-83FA-84636CAEE734}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Resiliency", "src\Resiliency\NBB.Resiliency\NBB.Resiliency.csproj", "{4A9EFAB3-B798-4323-86C0-39D4C2C67C86}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocFx", "docs\DocFx\DocFx.csproj", "{7C3851B7-151E-4DB4-8DC8-DED438D2A998}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.DataContracts.Tests", "test\UnitTests\Messaging\NBB.Messaging.DataContracts.Tests\NBB.Messaging.DataContracts.Tests.csproj", "{D4F5F69C-9A9F-425C-8DBA-B8053AE506B5}"
@@ -433,10 +421,6 @@ Global
{2F591414-63E0-4CD8-AA1E-11132CC20EA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F591414-63E0-4CD8-AA1E-11132CC20EA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F591414-63E0-4CD8-AA1E-11132CC20EA9}.Release|Any CPU.Build.0 = Release|Any CPU
- {602F852F-77EE-4335-BA45-170C32440575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {602F852F-77EE-4335-BA45-170C32440575}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {602F852F-77EE-4335-BA45-170C32440575}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {602F852F-77EE-4335-BA45-170C32440575}.Release|Any CPU.Build.0 = Release|Any CPU
{7197E4CE-120D-4601-AA8B-F65B8DB2E883}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7197E4CE-120D-4601-AA8B-F65B8DB2E883}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7197E4CE-120D-4601-AA8B-F65B8DB2E883}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -465,10 +449,6 @@ Global
{65743F60-F511-41E1-959B-D29FA3DB404D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65743F60-F511-41E1-959B-D29FA3DB404D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65743F60-F511-41E1-959B-D29FA3DB404D}.Release|Any CPU.Build.0 = Release|Any CPU
- {86A0DCDE-225B-4140-8195-A96F744573F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {86A0DCDE-225B-4140-8195-A96F744573F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {86A0DCDE-225B-4140-8195-A96F744573F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {86A0DCDE-225B-4140-8195-A96F744573F0}.Release|Any CPU.Build.0 = Release|Any CPU
{34A864A3-C25C-4DFA-BCE8-173F72B572A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34A864A3-C25C-4DFA-BCE8-173F72B572A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34A864A3-C25C-4DFA-BCE8-173F72B572A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -481,10 +461,6 @@ Global
{2E99F025-BDC0-430E-AD2A-C81141AC2BCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E99F025-BDC0-430E-AD2A-C81141AC2BCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E99F025-BDC0-430E-AD2A-C81141AC2BCA}.Release|Any CPU.Build.0 = Release|Any CPU
- {4831DD42-C73B-47DE-B5F6-9701F9773AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4831DD42-C73B-47DE-B5F6-9701F9773AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4831DD42-C73B-47DE-B5F6-9701F9773AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4831DD42-C73B-47DE-B5F6-9701F9773AD0}.Release|Any CPU.Build.0 = Release|Any CPU
{88B831EC-0DFE-40D7-9449-C4BDAE5B5512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88B831EC-0DFE-40D7-9449-C4BDAE5B5512}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88B831EC-0DFE-40D7-9449-C4BDAE5B5512}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -549,14 +525,6 @@ Global
{B15B9803-EB9D-4BA2-9B09-ACAE8F11252D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B15B9803-EB9D-4BA2-9B09-ACAE8F11252D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B15B9803-EB9D-4BA2-9B09-ACAE8F11252D}.Release|Any CPU.Build.0 = Release|Any CPU
- {6CBD9972-ABB1-4E15-8FB7-8F377A081490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6CBD9972-ABB1-4E15-8FB7-8F377A081490}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6CBD9972-ABB1-4E15-8FB7-8F377A081490}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6CBD9972-ABB1-4E15-8FB7-8F377A081490}.Release|Any CPU.Build.0 = Release|Any CPU
- {4A9EFAB3-B798-4323-86C0-39D4C2C67C86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4A9EFAB3-B798-4323-86C0-39D4C2C67C86}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4A9EFAB3-B798-4323-86C0-39D4C2C67C86}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4A9EFAB3-B798-4323-86C0-39D4C2C67C86}.Release|Any CPU.Build.0 = Release|Any CPU
{7C3851B7-151E-4DB4-8DC8-DED438D2A998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C3851B7-151E-4DB4-8DC8-DED438D2A998}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4F5F69C-9A9F-425C-8DBA-B8053AE506B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -778,7 +746,6 @@ Global
{5169916E-092C-431A-8577-50F2713C10CB} = {A820C4C2-1472-46ED-BA95-47B588B1D7AF}
{14726095-DA28-43A6-A9A9-F16C605932E1} = {7311E32F-C1B0-41C9-B5F1-DE9EBB6ABB55}
{2F591414-63E0-4CD8-AA1E-11132CC20EA9} = {14726095-DA28-43A6-A9A9-F16C605932E1}
- {602F852F-77EE-4335-BA45-170C32440575} = {584C62C0-2AE6-4DD6-9BCF-8FF28B7122CE}
{20C8482D-1525-47B0-B78B-09632892E8E4} = {7311E32F-C1B0-41C9-B5F1-DE9EBB6ABB55}
{7197E4CE-120D-4601-AA8B-F65B8DB2E883} = {20C8482D-1525-47B0-B78B-09632892E8E4}
{DD1FF81B-107E-4874-BD37-6E84EAD78EDD} = {20C8482D-1525-47B0-B78B-09632892E8E4}
@@ -788,12 +755,10 @@ Global
{25A21016-7DF7-4884-9241-AC21D7D35ABE} = {20C8482D-1525-47B0-B78B-09632892E8E4}
{3C1C5EBB-A1C4-4B27-A3B2-C99DF646273E} = {584C62C0-2AE6-4DD6-9BCF-8FF28B7122CE}
{65743F60-F511-41E1-959B-D29FA3DB404D} = {A4361674-5AB7-442D-8DA7-7187C9BCA38F}
- {86A0DCDE-225B-4140-8195-A96F744573F0} = {20C8482D-1525-47B0-B78B-09632892E8E4}
{34929B8F-4ED5-499C-A3AC-7ABE0F2F8FFE} = {D28298B7-63A2-4751-BEB9-C3C30F2E7107}
{34A864A3-C25C-4DFA-BCE8-173F72B572A3} = {34929B8F-4ED5-499C-A3AC-7ABE0F2F8FFE}
{5104F8FE-CF32-4B6A-93FB-B6A651FB9444} = {584C62C0-2AE6-4DD6-9BCF-8FF28B7122CE}
{2E99F025-BDC0-430E-AD2A-C81141AC2BCA} = {A4361674-5AB7-442D-8DA7-7187C9BCA38F}
- {4831DD42-C73B-47DE-B5F6-9701F9773AD0} = {0407911F-89FC-4138-BD4D-D4CFCFBB5DC1}
{88B831EC-0DFE-40D7-9449-C4BDAE5B5512} = {20C8482D-1525-47B0-B78B-09632892E8E4}
{FC77C6B6-EAB3-4CC0-8BB0-535BC4CB2C5B} = {20C8482D-1525-47B0-B78B-09632892E8E4}
{FA224C96-29E2-45F8-9CB9-B61636664F06} = {20C8482D-1525-47B0-B78B-09632892E8E4}
@@ -817,9 +782,6 @@ Global
{329C3A29-B023-478C-9D73-91621B101F81} = {F031DBDA-5D3F-4CE6-B133-09CE7E212584}
{4B368840-DA86-48FA-969D-A086F016BB7A} = {14726095-DA28-43A6-A9A9-F16C605932E1}
{B15B9803-EB9D-4BA2-9B09-ACAE8F11252D} = {584C62C0-2AE6-4DD6-9BCF-8FF28B7122CE}
- {6CBD9972-ABB1-4E15-8FB7-8F377A081490} = {20C8482D-1525-47B0-B78B-09632892E8E4}
- {A6E20C85-DEC2-4540-83FA-84636CAEE734} = {7311E32F-C1B0-41C9-B5F1-DE9EBB6ABB55}
- {4A9EFAB3-B798-4323-86C0-39D4C2C67C86} = {A6E20C85-DEC2-4540-83FA-84636CAEE734}
{7C3851B7-151E-4DB4-8DC8-DED438D2A998} = {C5410077-1E20-4DC2-8AB2-AB40CA80C4AF}
{D4F5F69C-9A9F-425C-8DBA-B8053AE506B5} = {A4361674-5AB7-442D-8DA7-7187C9BCA38F}
{E6C9D6ED-2405-45C6-898A-EE7CE9D7D5B2} = {A4361674-5AB7-442D-8DA7-7187C9BCA38F}
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application.Commands/NBB.Contracts.Application.Commands.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application.Commands/NBB.Contracts.Application.Commands.csproj
index efb52a67..aef22f22 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application.Commands/NBB.Contracts.Application.Commands.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application.Commands/NBB.Contracts.Application.Commands.csproj
@@ -21,7 +21,6 @@
-
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
index 4a81557c..518a72c6 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
@@ -13,7 +13,6 @@
-
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
index 317e70a9..e3f32f9b 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
@@ -39,7 +39,6 @@
-
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
index 7e6697c4..5d809768 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
@@ -14,7 +14,6 @@
using NBB.Messaging.Host.Builder;
using NBB.Messaging.Host.MessagingPipeline;
using NBB.Messaging.Nats;
-using NBB.Resiliency;
using Serilog;
using Serilog.Events;
using System.IO;
@@ -76,8 +75,6 @@ public static async Task Main(string[] _args)
.WithNewtownsoftJsonEventStoreSeserializer(new[] { new SingleValueObjectConverter() })
.WithAdoNetEventRepository();
- services.AddResiliency();
-
services.AddMessagingHost()
.AddSubscriberServices(config =>
config.FromMediatRHandledCommands().AddAllClasses())
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application.Commands/NBB.Invoices.Application.Commands.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application.Commands/NBB.Invoices.Application.Commands.csproj
index 21b21fc7..e6f01776 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application.Commands/NBB.Invoices.Application.Commands.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application.Commands/NBB.Invoices.Application.Commands.csproj
@@ -21,7 +21,6 @@
-
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
index 4a81557c..518a72c6 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
@@ -13,7 +13,6 @@
-
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
index a97d33d7..365d33a6 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
@@ -17,7 +17,6 @@
using NBB.Messaging.Host.Builder;
using NBB.Messaging.Host.MessagingPipeline;
using NBB.Messaging.Nats;
-using NBB.Resiliency;
using Serilog;
using Serilog.Events;
using Serilog.Sinks.MSSqlServer;
@@ -73,8 +72,6 @@ public static async Task Main(string[] _args)
.WithNewtownsoftJsonEventStoreSeserializer(new[] {new SingleValueObjectConverter()})
.WithAdoNetEventRepository();
- services.AddResiliency();
-
services.AddMessagingHost()
.AddSubscriberServices(config => config
.FromMediatRHandledCommands().AddAllClasses()
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Application.Commands/NBB.Payments.Application.Commands.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Application.Commands/NBB.Payments.Application.Commands.csproj
index 7299dba3..317db643 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Application.Commands/NBB.Payments.Application.Commands.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Application.Commands/NBB.Payments.Application.Commands.csproj
@@ -21,7 +21,6 @@
-
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
index bdc8e369..9db83f25 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
@@ -17,7 +17,6 @@
-
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
index 4f00453a..dcfcd68a 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
@@ -17,7 +17,6 @@
using NBB.Messaging.Nats;
using NBB.Payments.Application.CommandHandlers;
using NBB.Payments.Data;
-using NBB.Resiliency;
using Serilog;
using Serilog.Events;
using Serilog.Sinks.MSSqlServer;
@@ -75,8 +74,6 @@ public static async Task Main(string[] _args)
.WithNewtownsoftJsonEventStoreSeserializer(new[] {new SingleValueObjectConverter()})
.WithAdoNetEventRepository();
- services.AddResiliency();
-
services.AddMessagingHost()
.AddSubscriberServices(config => config
.FromMediatRHandledCommands().AddAllClasses()
diff --git a/samples/Monolith/NBB.Mono/Startup.cs b/samples/Monolith/NBB.Mono/Startup.cs
index b729810d..a4a6b3cc 100644
--- a/samples/Monolith/NBB.Mono/Startup.cs
+++ b/samples/Monolith/NBB.Mono/Startup.cs
@@ -21,7 +21,6 @@
using NBB.Core.DependencyInjection;
using NBB.Domain;
using NBB.Messaging.Host;
-using NBB.Resiliency;
using Microsoft.Extensions.Hosting;
using NBB.Messaging.Host.MessagingPipeline;
using NBB.Messaging.Host.Builder;
@@ -60,8 +59,6 @@ public void ConfigureServices(IServiceCollection services)
.WithNewtownsoftJsonEventStoreSeserializer(new[] { new SingleValueObjectConverter() })
.WithAdoNetEventRepository();
- services.AddResiliency();
-
services.AddMessagingHost()
.AddSubscriberServices(config => config
.FromMediatRHandledCommands().AddAllClasses()
diff --git a/samples/Orchestration/ProcessManagerSample/MessageMiddlewares/SubscriberLoggingMiddleware.cs b/samples/Orchestration/ProcessManagerSample/MessageMiddlewares/SubscriberLoggingMiddleware.cs
index 31d228a6..9a1b0545 100644
--- a/samples/Orchestration/ProcessManagerSample/MessageMiddlewares/SubscriberLoggingMiddleware.cs
+++ b/samples/Orchestration/ProcessManagerSample/MessageMiddlewares/SubscriberLoggingMiddleware.cs
@@ -3,7 +3,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using NBB.Core.Pipeline;
-using NBB.Messaging.DataContracts;
+using NBB.Messaging.Abstractions;
namespace ProcessManagerSample.MessageMiddlewares
{
diff --git a/samples/Orchestration/ProcessManagerSample/OrderProcessManager.cs b/samples/Orchestration/ProcessManagerSample/OrderProcessManager.cs
index fdd5190d..6d04b96b 100644
--- a/samples/Orchestration/ProcessManagerSample/OrderProcessManager.cs
+++ b/samples/Orchestration/ProcessManagerSample/OrderProcessManager.cs
@@ -31,12 +31,7 @@ public OrderProcessManager(IMapper mapper)
.Then(OrderCreatedHandler);
When()
- .SetState((received, state) =>
- {
- var newState = state.Data;
- newState.OrderId = Guid.NewGuid();
- return newState;
- })
+ .SetState((received, state) => state.Data with {OrderId = Guid.NewGuid()})
.Then((orderCreated, data) =>
{
var q1 = Mediator.SendQuery(new GetClientQuery());
diff --git a/samples/Orchestration/ProcessManagerSample/OrderProcessManagerData.cs b/samples/Orchestration/ProcessManagerSample/OrderProcessManagerData.cs
index 5f835e91..8f73d7f9 100644
--- a/samples/Orchestration/ProcessManagerSample/OrderProcessManagerData.cs
+++ b/samples/Orchestration/ProcessManagerSample/OrderProcessManagerData.cs
@@ -2,9 +2,9 @@
namespace ProcessManagerSample
{
- public struct OrderProcessManagerData
+ public record OrderProcessManagerData
{
- public Guid OrderId { get; set; }
- public bool IsPaid { get; set; }
+ public Guid OrderId { get; init; }
+ public bool IsPaid { get; init; }
}
}
\ No newline at end of file
diff --git a/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj b/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
index 6288e7ff..e3f186bf 100644
--- a/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
+++ b/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
@@ -28,7 +28,6 @@
-
diff --git a/samples/Orchestration/ProcessManagerSample/Program.cs b/samples/Orchestration/ProcessManagerSample/Program.cs
index 91327f00..250678b9 100644
--- a/samples/Orchestration/ProcessManagerSample/Program.cs
+++ b/samples/Orchestration/ProcessManagerSample/Program.cs
@@ -32,7 +32,7 @@ static async Task Main(string[] args)
Console.ReadKey();
- var orderId = Guid.Empty;
+ var orderId = Guid.NewGuid();
var pub = host.Services.GetRequiredService();
await pub.PublishAsync(new OrderCreated(orderId, 100, 0,0));
Console.ReadKey();
diff --git a/samples/Orchestration/ProcessManagerSample/Startup.cs b/samples/Orchestration/ProcessManagerSample/Startup.cs
index 15fb015e..8f6a7d30 100644
--- a/samples/Orchestration/ProcessManagerSample/Startup.cs
+++ b/samples/Orchestration/ProcessManagerSample/Startup.cs
@@ -3,7 +3,6 @@
using MediatR.Pipeline;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using NBB.Core.Abstractions;
using NBB.EventStore;
using NBB.EventStore.AdoNet;
using NBB.Messaging.Host;
@@ -11,7 +10,6 @@
using NBB.Messaging.Host.MessagingPipeline;
using NBB.Messaging.InProcessMessaging.Extensions;
using NBB.ProcessManager.Runtime;
-using NBB.Resiliency;
using ProcessManagerSample.MessageMiddlewares;
using ProcessManagerSample.Queries;
using System.Reflection;
@@ -36,7 +34,6 @@ public static void ConfigureServicesDelegate(HostBuilderContext context, IServic
.WithNewtownsoftJsonEventStoreSeserializer()
.WithAdoNetEventRepository();
- services.AddResiliency();
services.AddMessagingHost()
.AddSubscriberServices(config => config
.FromMediatRHandledCommands().AddAllClasses()
diff --git a/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj b/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
index 7766f065..d78de3e3 100644
--- a/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
+++ b/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
@@ -22,7 +22,6 @@
-
diff --git a/src/Core/NBB.Core.Abstractions/SetOnce.cs b/src/Core/NBB.Core.Abstractions/SetOnce.cs
deleted file mode 100644
index 4f975315..00000000
--- a/src/Core/NBB.Core.Abstractions/SetOnce.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace NBB.Core.Abstractions
-{
- public sealed class SetOnce
- {
- private T _value;
- private string _name;
-
- public SetOnce(string name = null)
- {
- _name = name;
- }
-
- public T Value
- {
- get => _value;
- set
- {
- if (!EqualityComparer.Default.Equals(this._value, default(T)))
- throw new InvalidOperationException($"{_name ?? nameof(Value)} is already set");
-
- this._value = value;
- }
- }
-
- public static implicit operator T(SetOnce value) { return value.Value; }
- }
-
-}
diff --git a/src/EventStore/NBB.EventStore.Host/EventStoreHostBuilder.cs b/src/EventStore/NBB.EventStore.Host/EventStoreHostBuilder.cs
deleted file mode 100644
index a87f5b01..00000000
--- a/src/EventStore/NBB.EventStore.Host/EventStoreHostBuilder.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using NBB.Core.Abstractions;
-using NBB.Core.Pipeline;
-using System;
-
-namespace NBB.EventStore.Host
-{
- public class EventStoreHostBuilder
- {
- public IServiceCollection ServiceCollection { get; }
-
- public EventStoreHostBuilder(IServiceCollection serviceCollection)
- {
- ServiceCollection = serviceCollection;
- AddSubscriberService();
- }
-
- public EventStoreHostBuilder UsePipeline(Action> configurePipeline)
- {
- ServiceCollection.AddScoped(serviceProvider =>
- {
- var pipelineBuilder = new PipelineBuilder