ServiceCollectionConfigurator.AddConsumer() ConfigureServices((hostContext, services) => Private static IHostBuilder CreateHostBuilder(string args) => Logger.LogInformation("Responder2 running.") Var host = CreateHostBuilder(args).Build() However, I chose not to start the bus at this point but rather use the Worker Service lifetime events to do that (described later). I was then able to configure the MassTransit bus using dependency injection. I also added support to deploy the Worker Service as a systemd daemon. First up I installed a few NuGet packages to enable MassTransit using AWS SQS transport, and support for dependency injection. I created a Worker Service using Visual Studio and adapted the template project to suit. Again, to reiterate my approach almost certainly isn’t best practice but served only to demonstrate the feasibility of the approach.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |