Class StickyStrategy
Sticky load balancer strategy.
Routes exchanges with the same key to the same endpoint using hash-based selection.
Falls back to round-robin when the key extractor returns null/empty.
Thread-safe.
public sealed class StickyStrategy : ILoadBalancerStrategy
Inheritance
Implements
Methods
Select(IExchange, IReadOnlyList<string>)
Selects the next target URI based on strategy logic.
public string Select(IExchange exchange, IReadOnlyList<string> endpoints)
Constructors
StickyStrategy(Func<IExchange, string?>)
Creates a sticky strategy with the given key extractor.