RabbitMQ - Different routing key per event

Hi

I’m using the event registry with RabbitMQ.
I set up my routing key at the outbound channel configuration and it works fine.

Is it possible to set different routing key for each message send to that channel instead of same key for all messages ?
I’m sending many events to the same exchange - and would like to route them to different queues and and consumers.

Thanks
Inbal

Hey @iadded,

No you can’t dynamically change the routing key for an outbound channel. What you can do though is to create different outbound channels with different routing keys. Then you can use the channel you want in the sending tasks.

Cheers,
Filip

Thanks @filiphr for this reply
That’s what I ended up doing

Is this something that might be added in future versions ? I think it can be very useful to have that ability

Thanks again for the fast response and all the great support on the forum
Inbal

Currently the outbound channels are fixed. You can always pick an outbound channel key based on an expression, so you can dynamically pick a channel you want to sent to.

I am not entirely sure how an ability like you are requesting might work.

Cheers,
Filip