TimedBatchBlock #112148
Unanswered
Amitharitan25
asked this question in
Ideas
TimedBatchBlock
#112148
Replies: 1 comment
-
I would love a core solution to this. We've home grown something like this as well but I'm sure it isn't that great. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I use the TPL BatchBlock in my application to reduce load on my consumer. What I do is gather a batch of data and then send that batch down the stream from my main app to the DB/Cloud queue (which I guess all that use this block do).
I as many others on stackoverflow, created a self solution to attach a timer to BatchBlock so that the data will not get "stale" while waiting for a flush.
This self mechanism includes wrapping the BatchBlock in another class and creating a timer that on expiration calls a batch flush.
Lately I started to consider contributing to .Net at my spare time and I believe this is a good first PR to have.
I would love to have some discussion if this change seems a good one and if so do we want to create another block - TimedBatchBlock or do we want to update the current implementation.
Regarding need I saw there are some other repos that were created to do exactly what I am proposing. I also saw many guides and questions on stackoverflow and equivalents regarding this issue.
Beta Was this translation helpful? Give feedback.
All reactions