jondot/sneakers

Created different worker per routing key

Closed this issue · 1 comments

Hi!

I just wanted to ask you about one thing. I have one app that we use for configuring other apps. The configuration is sent over RabbitMQ, and I have the following setup:

Configuration app:

Exchange name: attributes.ex
Routing keys:
specializations.event.updated
languages.event.updated
countries.event.updated

In the consumer app, I would like to use a separate worker for each routing key defined in "configuration app". Of course, I could use if/else statement (or even case statement) but it will be ugly :)

The thing is that currently there is no option to define sneakers worker per routing key (I was checking configuration options).

Is this something that can be added? Or maybe there is another way to achieve what I want?

Thank you in advance

You can use a separate queue per worker and set up any topology you like using the Bunny connection Sneakers exposes or even RabbitMQ definition imports.