@google-cloud/pubsub
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -108,11 +108,12 @@ "use strict"; | ||
this.isOpen = true; | ||
options = Object.assign({}, options || {}); | ||
// Needed for potentially large responses that may come from using exactly-once delivery. | ||
// This will get passed down to grpc client objects. | ||
const maxMetadataSize = 'grpc.max_metadata_size'; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const optionsAny = options; | ||
if (optionsAny[maxMetadataSize] === undefined) { | ||
optionsAny[maxMetadataSize] = 4 * 1024 * 1024; // 4 MiB | ||
} | ||
// Needed for potentially large responses that may come from using exactly-once delivery, | ||
// as well as trying to work around silent connection failures. | ||
// | ||
// These will get passed down to grpc client objects. User values will overwrite these. | ||
const grpcDefaults = { | ||
'grpc.max_metadata_size': 4 * 1024 * 1024, | ||
'grpc.keepalive_time_ms': 300000, | ||
'grpc.keepalive_timeout_ms': 20000, // 20 seconds | ||
}; | ||
options = Object.assign(grpcDefaults, options || {}); | ||
// Determine what scopes are needed. | ||
@@ -119,0 +120,0 @@ // It is the union of the scopes on both clients. |
{ | ||
"name": "@google-cloud/pubsub", | ||
"description": "Cloud Pub/Sub Client Library for Node.js", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
3865125
65044