Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
NServiceBus Cosmos Sample - Use NServiceBus
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseNServiceBus(_ =>
{
var endpointConfiguration = new EndpointConfiguration("Samples.Api");
var transport = endpointConfiguration.UseTransport<LearningTransport>();
var routing = transport.Routing();
routing.RouteToEndpoint(Assembly.Load("Messages"), "Samples.Worker");
endpointConfiguration.SendOnly();
return endpointConfiguration;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment