Improve batching of messages sent via Sink/Source.