Creates batching function that collects items
Time window for batching
Function to process batch
Function that adds items to batch
Creates batching function that collects items