I've been stuck for weeks on this problem which might have a very simple solution.
I have an existing asyncio application which takes care of running the asyncio event loop. I would like to optionally plug in a WAMP component what would publish some messages when something happens in my application.
I've been playing around and I'm struggling a lot to understand how to obtain an ApplicationSession instance without the help of the ApplicationRunner class. The reason I don't want to use ApplicationRunner is that the WAMP feature of publishing events has to be optional, and my event loop still needs to run without any WAMP component.
The run() method of ApplicationRunner looks like a good start to take ideas from. But It's not very clear to me what I'm supposed to do. Even if I manage to connect it with WampWebSocketClientFactory, how would my external application interact with it ? What would be a correct entry point from the outside to access the "publish()" feature ?
Maybe I'm having the wrong approach, my final need is simply to be able to optionally publish WAMP messages when something happens in my asyncio application.
Any clue would be very appreciated :)