How is it related to episerver? I guess the question is more like how to achieve this pubsub in ASP.NET right?
Hmm, yes, I guess you are right. I probably miss understanding on where in the startup code I would start the listener so that it runs all the time in the background.
E.g. using ModuleDependency(typeof(...)), [InitializableModule], or Startup.cs... And if there is some sort of best practice.
yeah, initializable module is the right place, epi handles the lifecycle so it starts after episerver is fully initialized and you can handle your specific pub/sub stuff
btw. we are pretty close with migrating epi to netcore, hopefully coming soon :)
I would like to create a subscriber for an external message bus solution, so that the web server can listen/receive external events and react to it (e.g. resync data, update inventory, prices, ...).
But how would I create such a subscriber that runs continiously in the background. In .Net Core I would use IHostApplicationLifetime and start the pub sub listener on ApplicationStarted.
How would I do that in EPI server (11.14)? Could anyone give me some hints?