Batcher using Microsoft.Tpl.Dataflow
var batchStockEvents = new BatchBlock&lt;T&gt;(batchSize);


I think that batchStockEvents is a weird name for a BatchBlock. It sounds like it's a collection of events, or something like that.



new Timer(delegate { batchStockEvents.TriggerBatch(); });


While using delegate this way allows you to ignore the parameter, I think it's cleaner (and shorter) to use lambda and use _ as the parameter name to indicate it's ignored:

new Timer(_ =&gt; batchStockEvents.TriggerBatch());




// Use a transform block to reset the timer whenever an item is inserted to avoid unnessary batches


Wouldn't it be enough to reset the timer whenever a batch is triggered? It would be more efficient and you would have one less block.

Also, the comment has a typo, it should be "unnecessary".



What's the purpose of the _buffer block? Couldn't Post() post directly to timeoutBlock?




  In particular, I'm not sure about my exception handling approach to raise errors when posting objects; but I couldn't come up with anything better.


Yeah, you can't rely on that check in Post() because by the time the failure happens, all items could have been posted. But if you just want to stop doing useless work by trying to Post() items that can never be processed, then I think this is the right approach.