google-cloud-pubsub 0.28.0
This release entails a complete rewrite of the Pub/Sub library, introducing non-blocking publish and subscribe functions. As this is a from-scratch rewrite, note that it is very much a breaking change.
This also entails that a "changelist" has limited value, but the highlights:
-
The unified
pubsub.Client
object has been replaced by aPublisherClient
andSubscriberClient
. -
The
publish
method (onPublisherClient
) now has the following signature:def publish(self, str: topic_name, bytes: data, **attributes) -> Future:
-
The
subscriber
method (onSubscriberClient
) now has the following signature:def subscriber(self, str: subscription_name) -> Policy:
The returned object here has an
open
method, which accepts a callback, which receives aMessage
as its only argument:def open(self, Callable: callback):
For more details, please consult the documentation.