A virtual node is a logical position in a consistent-hashing partition. The router derives a message key, hashes it, selects a virtual node, and then selects that node’s routee. section 6.3.4
Virtual nodes support two operational goals:
- Distribute messages more evenly across routees. section 6.3.4
- Allow routes to be added or removed without assigning hash codes directly to routees. section 6.3.4
- Configure their quantity through a factor multiplied by the number of routees. section 6.3.4
Routing messages by identifier
An aggregator can define mapping(command) = command.id, while a group router uses withConsistentHashingRouting(10, Aggregator.mapping). Messages with the same identifier produce the same hash and therefore reach the same routee. section 6.3.4
Trace the four routing steps from message key to hash, virtual node, and selected routee. section 6.3.4
