Skip to content

Instantly share code, notes, and snippets.

@frankhale
Created May 20, 2020 00:16
Show Gist options
  • Save frankhale/60634d7375353c8f9093616e1a001fde to your computer and use it in GitHub Desktop.
Save frankhale/60634d7375353c8f9093616e1a001fde to your computer and use it in GitHub Desktop.
MassTransitConfig
services.AddMassTransit(x =>
{
x.AddConsumer<MyMessageConsumer>();
x.AddBus(provider => Bus.Factory.CreateUsingInMemory(cfg =>
{
cfg.UseHealthCheck(provider);
cfg.ReceiveEndpoint("mymessage-endpoint", ep =>
{
ep.ConfigureConsumer<MyMessageConsumer>(provider);
});
}));
});
services.AddMassTransitHostedService();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment