This repository was archived by the owner on Mar 9, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
google/cloud/pubsub_v1/subscriber/_protocol
tests/unit/pubsub_v1/subscriber Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 5959"""The maximum amount of time in seconds to wait for additional request items
6060before processing the next batch of requests."""
6161
62- _ACK_IDS_BATCH_SIZE = 2500
62+ _ACK_IDS_BATCH_SIZE = 1000
6363"""The maximum number of ACK IDs to send in a single StreamingPullRequest.
64-
65- The backend imposes a maximum request size limit of 524288 bytes (512 KiB) per
66- acknowledge / modifyAckDeadline request. ACK IDs have a maximum size of 164
67- bytes, thus we cannot send more than o 524288/176 ~= 2979 ACK IDs in a single
68- StreamingPullRequest message.
69-
70- Accounting for some overhead, we should thus only send a maximum of 2500 ACK
71- IDs at a time.
7264"""
7365
7466_MIN_EXACTLY_ONCE_DELIVERY_ACK_MODACK_RETRY_DURATION_SECS = 1
Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ def test_ack_splitting_large_payload():
437437 dispatcher_ .ack (items )
438438
439439 calls = manager .send_unary_ack .call_args_list
440- assert len (calls ) == 3
440+ assert len (calls ) == 6
441441
442442 all_ack_ids = {item .ack_id for item in items }
443443 sent_ack_ids = collections .Counter ()
@@ -689,7 +689,7 @@ def test_modify_ack_deadline_splitting_large_payload():
689689 dispatcher_ .modify_ack_deadline (items )
690690
691691 calls = manager .send_unary_modack .call_args_list
692- assert len (calls ) == 3
692+ assert len (calls ) == 6
693693
694694 all_ack_ids = {item .ack_id for item in items }
695695 sent_ack_ids = collections .Counter ()
You can’t perform that action at this time.
0 commit comments