Notable Implementation Changes
- Dropping redundant
Policy._paused
data member (#4568). - Removing redundant "active" check in policy (#4603).
- Adding a
Consumer.active
property (#4604). - Making it impossible to call
Policy.open()
on an already opened
policy (#4606). - Bug fix (#4575): Fix bug with async publish for batches. There
were two related bugs. The first: if a batch exceeds themax_messages
from the batch settings, then thecommit()
will fail. The second:
when a "monitor" worker callscommit()
aftermax_latency
seconds,
a failure can occur if a new message is added to the batch during
the commit. To fix, the following changes were implemented:- Adding a "STARTING" status for
Batch.commit()
(#4614). This
fixes the issue when the batch exceedsmax_messages
. - Adding extra check in
Batch.will_accept
for the number of
messages (#4612). - Moving
will_accept()
check out ofPublisherClient.batch()
factory (#4613). - Checking
Batch.will_accept
in thread-safe way (#4616).
- Adding a "STARTING" status for
- Breaking API change: As part of #4613, changing
PublisherClient.batch()
to no longer accept amessage
(since thewill_accept
check needs to
happen in a more concurrency friendly way). In addition, changing the
create
argument so that it means "create even if batch already exists"
rather than "create if missing".