Skip to content

Commit

Permalink
fix: set x-goog-request-params for streaming pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalaboulhosn committed Oct 31, 2023
1 parent c3ebfb0 commit 01786f8
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit 01786f8

Please sign in to comment.