direct exchange type to x-delayed-message

44 views
Skip to first unread message

Nikola Jankovic

unread,
Nov 3, 2021, 8:45:18 PM11/3/21
to rabbitmq-users
I'm attempting to use the x-delayed-message exchange but running into some difficulty. 

I'm trying to implement retry functionality with exponential backoff. The goal is to republish messages using the x-delayed-message exchange in order to support delays but the obvious issue is that the original exchange for most of these consumers isn't x-delayed-message -- they're almost always direct. 

So the scenario I'm running into is: (1) consumer registered to direct exchange (2) error occurs (3) attempt to republish with delay using x-delayed-message exchange (4) error because the exchange is already registered as direct. 

This seems like an obvious workflow, the plugin supports specifying the exchange type in the x-delayed-type header that I'm passing, and yet it doesn't seem like there's a solution other than creating a new exchange for the delayed/retried messages to publish to. I feel like I'm missing an obvious step here but I haven't been able to find any resources online to help -- any suggestions would be useful. 

Reply all
Reply to author
Forward
0 new messages