NOTE:
I have already created Stackoverslow question for this issue and was asked by a Google Cloud Employee (Kamal Aboul-Hosn) to raise the issue over here.
Environment details
- OS:
- Node.js version: v18.16.1
- npm version: 9.5.1
@google-cloud/pubsub version: ^3.7.1
Steps to reproduce
I am using Node JS client for Google PubSub (RPC StreamingPullRequest API) with flow control. My subscription options look like that:
{
streamingOptions: {
// decrease this to reduce re-deliveries
maxStreams: 2, // default: 5
},
flowControl: {
allowExcessMessages: false,
maxMessages: 4000, // No issues at 2000
},
},
I reduced maxStreams from 5 (default) to 2 to reduce re-deliveries, as mentioned here in the docs. When I set the maxMessages to 4000, I get the following debug warning, which causes re-deliveries of messages:
Pubsub subscription received debug message: Failed to "ack" for 3000 message(s). Reason: 3 INVALID_ARGUMENT: Request payload size exceeds the limit: 524288 bytes.
Why am I getting the warning, and how can I increase the payload size?