func NewQueue[T any](maxNbItem int, maxRetentionTime clock.Duration, flushCB func([]T)) chan T
NewQueue returns a chan to enqueue elements
The flushCB function will be called with a slice of elements as soon as
* either maxNbItem elements have been enqueued since the last flush
* or maxRetentionTime has elapsed since the first element has been enqueued after the last flush.