Skip to content

Releases: googleapis/nodejs-pubsub

v0.16.5

08 Mar 16:37
Compare
Choose a tag to compare

Fixes

  • (#74) Correctly detect a project ID when one isn't provided during instantiation.
  • Update dependencies, including gRPC for more reliable performance.

v0.16.4

16 Feb 19:11
f2210ad
Compare
Choose a tag to compare

Fixes

  • (#70): Pull gRPC into a project only once.

v0.16.3

13 Feb 23:55
Compare
Choose a tag to compare

Fixes

  • (#37): Allow ack() and nack() methods to be destructured. (Thanks, @baronfel!)
  • (#40): Normalize arguments when using new.
  • Update dependencies to mitigate possible security issues.

v0.16.2

09 Jan 18:56
72c6418
Compare
Choose a tag to compare

Fixes

  • (#31): Downgrade gRPC to prevent version mismatches.

v0.16.1

21 Dec 16:43
51dbce5
Compare
Choose a tag to compare

Fixes

  • (#20): Properly handle a Promise override.

v0.16.0

13 Dec 21:11
Compare
Choose a tag to compare

Features

With this release the PubSub module is moved to a separate repository. The code in v1/ folder was regenerated, and while there should not be any compatibility issues, please feel free to report any issues you might find.

v0.15.0

08 Dec 21:24
Compare
Choose a tag to compare
  • #2744: The Pub/Sub IAM API now allows more control of each API request, referred to as gaxOptions. Refer to the IAM documentation for more information.

v0.14.1

08 Dec 21:23
Compare
Choose a tag to compare
  • #2580, #2583 Use insecure grpc credentials when emulator host (apiEndpoint) is set.
  • #2576, #2579 Tokenize project ID on subscription objects.

v0.14.0

08 Dec 21:23
Compare
Choose a tag to compare

@google-cloud/pubsub 0.14.0 Beta Release

@google-cloud/pubsub is now a Beta API. Libraries defined at the Beta quality level are expected to be mostly stable, while we work towards their release can
didate. We will address issues and requests with a higher priority.

⚠️ Breaking Changes

PubSub received a small redesign!

PR: #2380
API Documentation

Publishing Messages

When publishing messages we no longer allow data to come in the form of Strings or Objects, instead you must pass in a Buffer object. Attributes can now be passed in as a second optional parameter. Messages are batched together, so calling publish() multiple times will not result in multiple requests.

Before

var messages = [
  'foo',
  'bar'
];

topic.publish(message, function(err, messageIds, apiResponse) {});

After

var publisher = topic.publisher();
var callback = function(err, messageId, apiResponse) {};

var message1 = new Buffer('foo');

publisher.publish(message1, callback);

var message2 = new Buffer('bar');
var attributes = {
  key: 'value'
};

publisher.publish(message2, attributes, callback);

Message Handling

  • message.ack() no longer accepts a callback function, instead errors will be reported via subscription.on('error', function(err) {})
  • message.skip() has been removed in favor of message.nack()

Before

subscription.on('message', function(message) {
  // Ack the message
  message.ack(function(err) {});

  // Skip the message
  message.skip();
});

After

subscription.on('message', function(message) {
  // Ack the message (No longer accepts a callback)
  message.ack();

  // Do not ack the message, allowing more messages to come in
  message.nack();
});

subscription.pull() removed.

Please open an issue with any feedback, questions, or issues. We're happy to help during the transition.

v0.13.1

08 Dec 21:08
Compare
Choose a tag to compare

Features

  • #2390 Update parameters under which requests are retried.