How to publish to and consume from other rabbitmq exchange in nameko service?

204 views Asked by At

I am working with nameko to develop a microservice in python. I want to listen on some queue which is defined in different exchange in rabbitMQ. Also I want to publish to other Exchange with routing key from this nameko service.

How can I do that?

You can assume that all exchanges are on same rabbitMQ instance/broker. Thanks :)

1

There are 1 answers

0
Krzysiek On

You can configure exchange in .yaml config file. Nameko use 'rpc_exchange' and "nameko-rpc" is default but you can change it. E.G. your_config.yaml:

rpc_exchange: "<your custom exchange>"

This is described here: https://nameko.readthedocs.io/en/stable/cli.html#running-a-service