Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set x-goog-request-params for streaming pull request #1849

Merged
merged 8 commits into from
Nov 3, 2023
7 changes: 6 additions & 1 deletion src/message-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down