Skip to content

Commit

Permalink
Update Configure.Mq.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Feb 6, 2024
1 parent 404c5c3 commit 89feacb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MyApp/Configure.Mq.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public void Configure(IWebHostBuilder builder) => builder
services.AddSingleton<IMessageService>(c => new BackgroundMqService());
})
.ConfigureAppHost(afterAppHostInit: appHost => {
appHost.Resolve<IMessageService>().Start();
var mqService = appHost.Resolve<IMessageService>();

//Register ServiceStack APIs you want to be able to invoke via MQ
mqService.RegisterHandler<SendEmail>(appHost.ExecuteMessage);
mqService.Start();
});
}

Expand Down

0 comments on commit 89feacb

Please sign in to comment.