Aiohttp-crossbar integration

#1

Hi,

i need to integrate a microservice based on aiohttp in an architecture which uses Crossbar as a pub-sub router.

Basically, i would like to do something like:

# class SampleTaskController(object):
async def handle_get_request(self, request: web.Request) -> web.Response:
    self.publisher.publish('com.myapp.topic1', 'Hello World!')
    return web.HTTPOk()

where handle_get_request is an handler for a route of my aiohttp web server.

How can i achieve that? I’ve looked at the examples on GitHub but they rely on the ApplicationRunner.

A more detailed description of my problem can be found on https://stackoverflow.com/questions/45188506/integrate-autobahnpython-with-aiohttp

0 Likes