Skip to content

google-cloud-pubsub 0.28.0

Compare
Choose a tag to compare
@lukesneeringer lukesneeringer released this 24 Aug 18:03

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 a PublisherClient and SubscriberClient.

  • The publish method (on PublisherClient) now has the following signature:

    def publish(self, str: topic_name, bytes: data, **attributes) -> Future:
  • The subscriber method (on SubscriberClient) 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 a Message as its only argument:

    def open(self, Callable: callback):

For more details, please consult the documentation.