Releases: googleapis/python-pubsub
Releases · googleapis/python-pubsub
v0.30.0: Creating `google-cloud-pubsub==0.30.0` release. (#4619)
Notable Implementation Changes
- Dropping redundant
Policy._pauseddata member (#4568). - Removing redundant "active" check in policy (#4603).
- Adding a
Consumer.activeproperty (#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_latencyseconds,
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_acceptfor the number of
messages (#4612). - Moving
will_accept()check out ofPublisherClient.batch()
factory (#4613). - Checking
Batch.will_acceptin 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_acceptcheck needs to
happen in a more concurrency friendly way). In addition, changing the
createargument so that it means "create even if batch already exists"
rather than "create if missing".
Documentation
v0.29.4
Notable Implementation Changes
- Bug fix: Restore previous behavior of the subscription lease
maintenance worker. This was accidentally "stopped" in0.29.3
due to a change in implementation that went from anactive
boolean to an "inactive" /stoppedboolean, soTruebecame
Falseand vice-versa (#4564).
v0.29.3
Notable Implementation Changes
- In subscription consumer thread: Making sure the request generator
attached to an inactive bidirectional streaming pull is stopped before
spawning a new request generator. This way we have a (fairly strong)
guarantee that requests in the queue don't get sent into an inactive
stream (#4503, #4554). - Adding
pause/resumeto subscription consumer thread and using these
methods during flow control. The previous implementation tried to close the
subscription (which involved 3 worker threads and 10 executors in a thread
pool) and then re-open a new subscription. But, this was not entirely
possible to shut down correctly from within one of the worker threads.
Instead, we only pause the worker (of the 3) that is pulling new responses
from the bidirectional streaming pull (#4558). - Bug fix (#4516): Using
maxwhereminwas used by mistake to
ensure the number of bytes tracked for subscription flow control
remained non-negative (#4514). - Raising
TypeErrorifSubscriberClient.subscribereceives a
non-callable callback (#4497). - Shutting down thread pool executor when closing a subscriber
policy (#4522). - Renaming
Policy.on_callback_requesttoPolicy.dispatch_callback
and making the behavior much less dynamic (#4511). - Make sure subscription consumer thread doesn't try to join itself
when exiting in error (#4540).
Dependencies
v0.29.2
Notable Implementation Changes
- Bug fix (#4463): Making a subscription consumer actually stop
running after encountering an exception (#4472, #4498). This bug
is the only reason for the0.29.2release. - Thread Changes
- Logging changes
- Adding debug logs when lease management exits (#4484)
- Adding debug logs when
QueueCallbackThreadexits (#4494).
Instances handle the processing of messages in a
subscription (e.g. toack). - Using a named logger in
publisher.batch.thread(#4473) - Adding newlines before logging protobuf payloads (#4471)
v0.29.1
Notable Implementation Changes
- Bug fix (#4234): Adding retries for connection
UNAVAILABLE. This
bug made the Pub / Sub client mostly unusable for subscribers to topics
that don't have a steady stream of messages. After ~2 minutes of inactivity,
the gRPC connection would timeout and raiseUNAVAILABLElocally, i.e. not
due to a response from the backend. (#4444) - Updating autogenerated packages (#4438)
Documentation
- Fixing broken examples in quick start (#4398)
- Fixing broken example in README (#4402, h/t to @mehmetboraezer)
- Updating old/dead link to usage doc in README (#4406, h/t to @mehmetboraezer)
Dependencies
- Dropping dependency on
google-cloud-corein exchange for
google-api-core(#4438)
v0.29.0: Making release for most packages. (#4296)
Notable Implementation Changes
- Honor
max_messagesalways (#4262) - Add futures for subscriptions (#4265)
- Set gRPC message options and keepalive (#4269)
Documentation
- Added link to "Python Development Environment Setup Guide" in
project README (#4187, h/t to @michaelawyu)