private void EnqueueData(IEventProducer producer, int count) { Enumerable.Range(0, count).ToList().ForEach(async(i) => { await producer.Enqueue(new Data { IntProp = i, StrProp = DateTime.Now.ToLongTimeString() }); }); }