Routing in the cluster
When a command is received by your code in Aeron Cluster, all it receives is:
1 2 3 4 5 6
Inbound messages will need to demuxed from the data on the buffer. Exactly how this is done is dependent on how you've implemented the commands. In this example, we're using Eider, and Eider holds two identifiers to help. First, it holds the Eider group, which allows us to group messages into a single demuxer where it makes sense. Then, Eider stores the message type, which is used for the demuxing of the buffer data.
In the sample, the
MasterDemuxer reads the Eider Group from the buffer, and then selects the correct final demuxer:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18