Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Created October 8, 2021 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitvijay/1fc69699146165517a7773f125d06504 to your computer and use it in GitHub Desktop.
Save ankitvijay/1fc69699146165517a7773f125d06504 to your computer and use it in GitHub Desktop.
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