Created
May 20, 2020 00:16
-
-
Save frankhale/60634d7375353c8f9093616e1a001fde to your computer and use it in GitHub Desktop.
MassTransitConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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