-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Describe the feature.
There is a lot of code that's common to all endpoints in an NServiceBus system, and this code shouldn't be duplicated across all endpoints.
As an example, in the AWS Loan Broker Showcase, the CommonConfigurations project collapses everything down to a single extension method.
A template could provide sensible defaults with selectable transport and persistence, similar to the existing endpoint template, and then allow system architects to further customize it.
That means that individual endpoints can have ultra-simple Program.cs files such as:
using CommonConfigurations;
using Microsoft.Extensions.Hosting;
Host.CreateApplicationBuilder(args)
.ConfigureAwsNServiceBusEndpoint("Bank2Adapter")
.Build()
.Run();Even when routing information must be provided…
using CommonConfigurations;
using LoanBroker;
using LoanBroker.Messages;
using Microsoft.Extensions.Hosting;
Host.CreateApplicationBuilder(args)
.ConfigureServices()
.ConfigureAwsNServiceBusEndpoint("LoanBroker", c => c.Routing.RouteToEndpoint(typeof(FindBestLoanWithScore), "LoanBroker"))
.Build()
.Run();
Additional Context
No response