Rabbitmq and catch all queue -


in company i'm running battery of tests running on different android devices.

today tests (that tasks) running in single queue multiple workers.

i want split single queue in multiple queue, 1 every device in order optimize tests launches according how many x devices company has (i.e. if company has 2 devices want send tests on devices in queue single worker --concurrency=2 can launch max 2 test in row).

i don't want migrate in time i'm taking first step implement hybrid version , logic i'd implement following.

device a (there 2 of them) , b (it's one) go on queue a , queue b while others in old legacy one.

enter image description here

my problem legacy queue. if send test on device c, sending task queue c, since catch_all queue named legacy task not received. i'm searching way say: "please rabbitmq use queue legacy if existing queue name not match device name".

there way achieve this?

you can combination of alternate exchange (https://www.rabbitmq.com/ae.html), , bindings routing keys

your setup have queuea , queueb bound through exchange, using binding key represents device.

 | exchange| binding  | queue  | |---------|----------|--------| |  my.ex  | device.a | queuea | |  my.ex  | device.b | queueb | 

when publish message device a, have routing key of device.a , go queuea.

now of legacy devices, set alternate exchange on exchange configuration. deliver messages don't match device.a or device.b routing keys, alternate exchange.

the alternate exchange route messages legacy queue.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -