Is your feature request related to a problem? Please describe.
Currently it's possible to specify the maximum size of the queue (both memory-backed and persistent) in number of batches. It would be useful to specify max size in bytes (especially for the persistent queue)
Describe the solution you'd like
We could add another parameter, which could be used to describe the maximum size in bytes. To avoid confusing the queue size limit in number of batches vs number of bytes, perhaps queue_size could be deprecated (and used as an alternative for one of the new parameters). Then we could have queues_size_batches and queue_size_bytes or so (other suggestions welcome).
When both of them are specified, hitting any would cause dropping data