Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue to use direct exchange routing v1 #200

Merged
merged 1 commit into from May 20, 2022

Conversation

ansd
Copy link
Member

@ansd ansd commented May 20, 2022

x-delayed-message exchange type does not use direct exchange routing v2
even when this feature flag is enabled.
Therefore, route directly via rabbit_router:match_routing_key/2 which corresponds
to "direct exchange routing v1".

Fixes failing tests against rabbitmq-server master branch.

Similar to what's done in rabbitmq/rabbitmq-lvc-exchange#32.

Fixes #199

x-delayed-message exchange type does not use direct exchange routing v2
even when this feature flag is enabled.
Therefore, route directly via rabbit_router:match_routing_key/2 which corresponds
to "direct exchange routing v1".

Fix failing tests against rabbitmq-server master branch.

Fixes #199
@ansd ansd force-pushed the no-direct-exchange-routing-v2 branch from 5393a59 to ab581d7 Compare May 20, 2022 15:59
@michaelklishin michaelklishin merged commit baa407d into master May 20, 2022
@michaelklishin michaelklishin deleted the no-direct-exchange-routing-v2 branch May 20, 2022 17:01
ansd added a commit to rabbitmq/rabbitmq-server that referenced this pull request Dec 13, 2022
Custom exchange types can use the direct exchange as a proxy for
routing. However, custom exchange types should continue to use "direct
exchange routing v1" because their bindings are not inserted into the
new routing table `rabbit_index_route`.

This commits avoids changing the custom exchange types to call
`rabbit_router:match_routing_key/2` directly as done in
rabbitmq/rabbitmq-delayed-message-exchange#200
and
rabbitmq/rabbitmq-lvc-exchange#32
because other exchange types are out there (as we learnt in
#4606 (comment))
which also need to continue to use v1.

So, the cleaner approach is to only use direct exchange routing v2 if
1. the feature flag 'direct_exchange_routing_v2' is enabled, and
2. the source exchange is of type 'direct'
mergify bot pushed a commit to rabbitmq/rabbitmq-server that referenced this pull request Dec 13, 2022
Custom exchange types can use the direct exchange as a proxy for
routing. However, custom exchange types should continue to use "direct
exchange routing v1" because their bindings are not inserted into the
new routing table `rabbit_index_route`.

This commits avoids changing the custom exchange types to call
`rabbit_router:match_routing_key/2` directly as done in
rabbitmq/rabbitmq-delayed-message-exchange#200
and
rabbitmq/rabbitmq-lvc-exchange#32
because other exchange types are out there (as we learnt in
#4606 (comment))
which also need to continue to use v1.

So, the cleaner approach is to only use direct exchange routing v2 if
1. the feature flag 'direct_exchange_routing_v2' is enabled, and
2. the source exchange is of type 'direct'

(cherry picked from commit a25eeb0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"x-delayed-type = direct" does not work with direct_exchange_routing_v2 enabled
2 participants