Add batch API for batching messages sent through all connections.