public MessageKeyPartitionSelection(ISerializer keySerializer, IPartitionSelection roundRobinSelection, ILogger logger) { _keySerializer = keySerializer; _roundRobinSelection = roundRobinSelection; _logger = logger; _rnd = new Random(); _messageKeyBuffersPool = new Pool <ReusableMemoryStream>( limit: 100, constructor: () => new ReusableMemoryStream(_messageKeyBuffersPool), clearAction: (stream, reused) => { if (reused) { stream.SetLength(0); } }); }
public PartitionSelector(IPartitionSelection partitionSelection) { _partitionSelection = partitionSelection; }