Add a batching mechanism for riemann TCP writes