Skip to content

Commit 91c89d3

Browse files
feat: add max messages batching for Cloud Storage subscriptions (#1224)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fbd9840 commit 91c89d3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

google/pubsub_v1/types/pubsub.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,10 @@ class CloudStorageConfig(proto.Message):
14321432
Storage file before a new file is created. Min 1 KB, max 10
14331433
GiB. The max_bytes limit may be exceeded in cases where
14341434
messages are larger than the limit.
1435+
max_messages (int):
1436+
Optional. The maximum number of messages that
1437+
can be written to a Cloud Storage file before a
1438+
new file is created. Min 1000 messages.
14351439
state (google.pubsub_v1.types.CloudStorageConfig.State):
14361440
Output only. An output-only field that
14371441
indicates whether or not the subscription can
@@ -1551,6 +1555,10 @@ class AvroConfig(proto.Message):
15511555
proto.INT64,
15521556
number=7,
15531557
)
1558+
max_messages: int = proto.Field(
1559+
proto.INT64,
1560+
number=8,
1561+
)
15541562
state: State = proto.Field(
15551563
proto.ENUM,
15561564
number=9,

samples/generated_samples/snippet_metadata_google.pubsub.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-pubsub",
11-
"version": "2.22.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)