class PostHog::MessageBatch

def size_exhausted?

the message can be accomodated in this batch.
peeking, and to consider the next message size when calculating whether
The alternative is to use our own `Queue` implementation that allows

here is that we might fit in less messages than possible into a batch.
to use a native Ruby `Queue` that doesn't allow peeking. The tradeoff
message of the largest size possible. This is a shortcut that allows us
We consider the max size here as just enough to leave room for one more
def size_exhausted?
  @json_size >= (MAX_BYTES - Defaults::Message::MAX_BYTES)
end