public Task StartPeriodicProducing(Orleans.Streams.IStreamIdentity identity)
        {
            _logger.Info("StartPeriodicProducing");

            if (_producerTimers.ContainsKey(identity))
            {
                _logger.Info("Already producing");
            }
            else
            {
                var timer = base.RegisterTimer(TimerCallback, identity, TimeSpan.Zero, TimeSpan.FromMilliseconds(1));
                _producerTimers.Add(identity, timer);
            }

            return(TaskDone.Done);
        }
        public Task StopPeriodicProducing(Orleans.Streams.IStreamIdentity identity)
        {
            _logger.Info("StopPeriodicProducing");

            if (!_producerTimers.ContainsKey(identity))
            {
                _logger.Info("Not producing anything");
            }
            else
            {
                _producerTimers[identity].Dispose();
                _producerTimers[identity] = null;
                _producerTimers.Remove(identity);
            }
            return(TaskDone.Done);
        }