Skip to content

Commit 964af5e

Browse files
committed
Khepri: use binding projections for all but headers and topic exchanges
Other exchange types, such as 'x-modulus-hash' on rabbitmq_sharding, also require this routing to work.
1 parent 2dfa7b1 commit 964af5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,9 +958,9 @@ register_rabbit_index_route_projection() ->
958958
Projection = khepri_projection:new(
959959
rabbit_khepri_index_route, ProjectionFun, Options),
960960
DirectOrFanout = #if_data_matches{pattern = #{type => '$1'},
961-
conditions = [{'orelse',
962-
{'=:=', '$1', direct},
963-
{'=:=', '$1', fanout}}]},
961+
conditions = [{'andalso',
962+
{'=/=', '$1', headers},
963+
{'=/=', '$1', topic}}]},
964964
PathPattern = [rabbit_db_binding,
965965
routes,
966966
_VHost = ?KHEPRI_WILDCARD_STAR,

0 commit comments

Comments
 (0)