v0.23.0
01-16-2019 13:09 PST
This release has breaking changes.
BREAKING: Topic#publisher()
has been removed in favor of Topic#publish()
(#426)
Before
const publisher = topic.publisher(publishOptions);
await publisher.publish(Buffer.from('Hello, world!'));
After
topic.setPublishOptions(publishOptions);
await topic.publish(Buffer.from('Hello, world!'));
BREAKING: Subscription
options have changed. (#388)
Before
const subscription = topic.subscription('my-sub', {
batching: {
maxMilliseconds: 100,
},
flowControl: {
maxBytes: os.freem() * 0.2,
maxMessages: 100,
},
maxConnections: 5,
});
After
const subscription = topic.subscription('my-sub', {
ackDeadline: 10,
batching: {
callOptions: {}, // gax call options
maxMessages: 3000,
maxMilliseconds: 100,
},
flowControl: {
allowExcessMessages: true,
maxBytes: os.freem() * 0.2,
maxExtension: Infinity,
maxMessages: 100
},
streamingOptions: {
highWaterMark: 0,
maxStreams: 5, // formerly known as maxConnections
timeout: 60000 * 5, // 5 minutes
}
});
BREAKING: messages are no longer plain objects. (#388)
Messages were refactored into a class,
this will only affect (some) users who treat messages like plain old objects.
The following example is something that would have worked previously, but will
now throw a TypeError
since ack
lives on the prototype chain.
const m = Object.assign({}, message, customData);
m.ack(); // TypeError: m.ack is not a function
New Features
- feat(topic): create method for publishing json (#430)
Dependencies
- fix(deps): update dependency google-gax to ^0.23.0 (#423)
- chore(deps): update dependency @types/sinon to v7 (#411)
- chore: update nyc and eslint configs (#409)
Documentation
- docs(samples): correct publish retry settings (#419)
- docs: sync generated grpc message type docs
- fix(docs): remove unused long running operations and IAM types
- fix: modernize the sample tests (#414)