From 01786f88041aeddb23183828b6aad2e4f6f4af6e Mon Sep 17 00:00:00 2001 From: Kamal Aboul-Hosn Date: Tue, 31 Oct 2023 14:39:45 -0400 Subject: [PATCH] fix: set x-goog-request-params for streaming pull request --- src/message-stream.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/message-stream.ts b/src/message-stream.ts index 7ea275ee5..80b714496 100644 --- a/src/message-stream.ts +++ b/src/message-stream.ts @@ -323,8 +323,13 @@ export class MessageStream extends PassThrough { ? 0 : this._subscriber.maxBytes, }; + const otherArgs = { + headers: { + 'x-goog-request-params': 'subscription=' + this._subscriber.name, + }, + }; - const stream: PullStream = client.streamingPull({deadline}); + const stream: PullStream = client.streamingPull({deadline, otherArgs}); this._replaceStream(index, stream); stream.write(request); }