Skip to content

Releases: googleapis/nodejs-pubsub

v0.13.0

08 Dec 21:07
Compare
Choose a tag to compare

Features

  • #2330 Allow custom endpoints from options.apiEndpoint. (Thanks, @mkamioner!)

v0.12.0

08 Dec 21:07
Compare
Choose a tag to compare

Features

  • #2240: Implement message retention.

Fixes

  • #2256: Prevent decoding, then re-encoding messages to base64.

v0.11.0

08 Dec 21:06
Compare
Choose a tag to compare

Features

Fixes

  • #2242: Set sane defaults for request timeouts.

v0.10.0

08 Dec 21:05
Compare
Choose a tag to compare

Features

  • #2200 Add support for Snapshots and Seek functionality.

v0.9.0

08 Dec 21:04
Compare
Choose a tag to compare

⚠️ Breaking Changes!

Dropped support for Node v0.12.x

2171

We've officially dropped support for Node v0.12.x in all of our APIs. It may still work, but it is not officially supported and may stop working at any time.

Features

  • 1979, 2042: Add option to pass timeout to ack.

v0.8.1

08 Dec 21:02
Compare
Choose a tag to compare

Fixes

v0.7.0

08 Dec 21:01
Compare
Choose a tag to compare

⚠️ Breaking Changes!

reuseExisting option removed

#1257, #1799

By default, if you provide a subscription name to subscribe(), a subscription with that name will be created, if necessary.

If you don't provide a name, one will be automatically created.

Before

topic.subscribe('my-subscription', { reuseExisting: true }, function(err, subscription) {
  // subscription was either created or re-used
})

After

topic.subscribe('my-subscription', function(err, subscription) {
  // subscription was either created or re-used
})

Features

v0.6.0

08 Dec 21:00
Compare
Choose a tag to compare

Features

  • #1744, #1755: Set a custom pushEndpoint on a subscription.

v0.5.0

08 Dec 20:59
Compare
Choose a tag to compare

Features

v0.4.0

08 Dec 20:59
Compare
Choose a tag to compare

⚠️ Breaking Changes

Promises have arrived!

Issue: #551
PR: #1702

It's been a long time coming, but we're finally here. We've shipped promise support in the Google Cloud Pub/Sub module!

Do I have to use promises?

Nope, carry on. (But keep reading if you use streams)

How do I use promises?

Don't pass a callback:

var pubsub = require('@google-cloud/pubsub')();

pubsub.getTopics()
  .then(function(data) {
    var topics = data[0];
  })
  .catch(function(err) {});

How do I use a method as a stream?

All of the streaming functionality from our methods have been moved to their own method.

var pubsub = require('@google-cloud/pubsub')();

- pubsub.getSubscriptions()
+ pubsub.getSubscriptionsStream()
    .on('data', function(subscription) {})

- pubsub.getTopics()
+ pubsub.getTopicsStream()
    .on('data', function(topic) {})
var topic = pubsub.topic('my-topic-name');

- topic.getSubscriptions()
+ topic.getSubscriptionsStream()
    .on('data', function(subscription) {})