This exchange type uses consistent hashing to uniformly distribute messages across queues.
In this part we need only one exchange and there can be many queues it should divide messages in all queues which are bounded to it.

Prerequisites :-
- RabbitMQ Consistent Hash Exchange Type Plugin.
rabbitmq-plugins enable rabbitmq_consistent_hash_exchange
After Enabling Consistent Hash Exchange Type Below Exchange option will be Available to Use.

Example :-
- Creating 1 exchange
- Added 5 Queues
- All 5 queues are bonded to same exchange with routing key.
Example :- routing key
- hash_queues_1 =1,
- hash_queues_2=2,
- hash_queues_3=3,
- hash_queues_3=4,
- hash_queues_4=5
Now when I publish message I sent routing key as “int” according to it divide messages into 5 Queues.

Image source :- https://lavinmq.com
How It Works
In the case of Consistent Hashing as an exchange type, the hash is calculated from a message property (most commonly the routing key).
When a queue is bound to this exchange, it is assigned one or more partitions on the consistent hashing ring depending on its binding weight (covered below).
For every property hash (e.g. routing key), a hash position computed and a corresponding hash ring partition is picked. That partition corresponds to a bound queue, and the message is routed to that queue.
Assuming a reasonably even routing key distribution of inbound messages, routed messages should be reasonably evenly distributed across all ring partitions, and thus queues according to their binding weights.
Without Consistent Hashing Exchange

