When receiving a message from a route, if the queue interest is only routes and leaf connections, the server will always favor the leaf kind. However, if there were more than one leaf connections for the same queue group, the server will always pick the same (the last one). It would change if new leaf were to connect or disconnect/reconnect, but with a stable set, it would always be the same.
When receiving a message from a route, if the queue interest is only routes and leaf connections, the server will always favor the leaf kind. However, if there were more than one leaf connections for the same queue group, the server will always pick the same (the last one). It would change if new leaf were to connect or disconnect/reconnect, but with a stable set, it would always be the same.
This PR makes this selection somewhat random.
Resolves #6040
Signed-off-by: Ivan Kozlovic ivan@synadia.com