public async Task SendAsync(TItem item) { var key = _itemToKeyConverter.Convert(item); ITarget <TItem> target; if (!_targets.TryGetValue(key, out target)) { target = _targets.AddOrUpdate(key, k => _targetGroupFactory.CreateTarget(k), (k, i) => i); } await target.SendAsync(item); }
public ITarget <TItem> CreateTarget(TKey key) { return(new BatchingTarget <TItem>(_targetFactory.CreateTarget(key), _batchSize, _forceSendTimeout, _exceptionHandler)); }
public ITarget <TItem> CreateTarget(TKey key) { return(new BufferingTarget <TItem>(_targetFactory.CreateTarget(key), _exceptionHandler, _bifferConsumersCount)); }