Skip to main content
InterviewHubPRO
Section Overview
Q39

Question 39 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

78%
RabbitMQ & AMQP (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

Consistent Hash Exchange plugin: Distributing sharded workloads across queues deterministically.

senior LevelSystem DesignData Structures

In Simple Words: When you need to scale beyond a single queue's throughput while strictly preserving per-user message ordering:

  • The Consistent Hash Exchange hashes the routing key (e.g. user_id) and distributes messages evenly across $N$ bound queues based on hash ring intervals.
  • All messages for user 101 will deterministically land in Queue B, while user 102 lands in Queue A.
  • Each queue has a dedicated single consumer, ensuring parallel processing without cross-user race conditions.