0

I have a blockingcollection which needs to be batch processed for 5 mins duration. Right now I am using GetConsumingEnumerable() but I don't want this instead I need to batch process.

var reqs = MessageFactory.NetApiRequestQueue.GetConsumingEnumerable(token).ToObservable();           

reqs.SubscribeOn(ThreadPoolScheduler.Instance).Subscribe(x =>
{
});
Andre Kampling
  • 5,476
  • 2
  • 20
  • 47
  • Added language tag and corrected code indentation. – Andre Kampling Aug 01 '17 at 11:16
  • Since you are using Reactive Extension you can try to use throttle which allows the behavior you want. [Observable.Throttle msdn](https://msdn.microsoft.com/en-us/library/hh229400%28v=vs.103%29.aspx?f=255&MSPPError=-2147217396) – Alcruz Aug 01 '17 at 11:20

0 Answers0