How to alias channels in Aeron¶
Problem¶
- You have many channels in use, and you want to easily identify them
- You want to capture Aeron counters for specific channels
- You want an easy way to find a given Aeron Archive
Solution¶
Add aliases to the channel definition.
Discussion¶
Aliases can be used to help identify channels programmatically. Aeron channels support multiple parameters.
To add an alias, add or append the alias keyword.
aeron:ipc?alias=abcIPC channel, with alias as the first parameteraeron:udp?endpoint=192.168.0.1:12345|alias=defUDP channel, with the alias as the 2nd parameter.
These aliases will appear in AeronStat output.
Reading the channel alias in a counter¶
1 2 3 4 5 6 7 8 | |
Finding an archive with alias¶
Aeron Archive's listRecordingsForUri accepts a channel fragment parameter. You can include the alias in this:
1 2 3 4 5 6 7 | |