Record queue size
Use a json Encoder
Allow concurrent batches to be sent