Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 95a86fa

Browse filesBrowse files
feat: add support for exactly once delivery (#578)
* feat: add exactly once delivery flag PiperOrigin-RevId: 426415626 Source-Link: googleapis/googleapis@1f707ab Source-Link: googleapis/googleapis-gen@2baebc5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmJhZWJjNTc5ZWQ0MmM0ZDE3ODgzYTE0ZWNhNjQ0MTFmNjlkY2M4NyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent d6614e2 commit 95a86fa
Copy full SHA for 95a86fa

File tree

Expand file treeCollapse file tree

1 file changed

+52
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+52
-0
lines changed
Open diff view settings
Collapse file

‎google/pubsub_v1/types/pubsub.py‎

Copy file name to clipboardExpand all lines: google/pubsub_v1/types/pubsub.py
+52Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,24 +1123,76 @@ class StreamingPullResponse(proto.Message):
11231123
received_messages (Sequence[google.pubsub_v1.types.ReceivedMessage]):
11241124
Received Pub/Sub messages. This will not be
11251125
empty.
1126+
acknowlege_confirmation (google.pubsub_v1.types.StreamingPullResponse.AcknowledgeConfirmation):
1127+
This field will only be set if
1128+
``enable_exactly_once_delivery`` is set to ``true``.
1129+
modify_ack_deadline_confirmation (google.pubsub_v1.types.StreamingPullResponse.ModifyAckDeadlineConfirmation):
1130+
This field will only be set if
1131+
``enable_exactly_once_delivery`` is set to ``true``.
11261132
subscription_properties (google.pubsub_v1.types.StreamingPullResponse.SubscriptionProperties):
11271133
Properties associated with this subscription.
11281134
"""
11291135

1136+
class AcknowledgeConfirmation(proto.Message):
1137+
r"""Acknowledgement IDs sent in one or more previous requests to
1138+
acknowledge a previously received message.
1139+
1140+
Attributes:
1141+
ack_ids (Sequence[str]):
1142+
Successfully processed acknowledgement IDs.
1143+
invalid_ack_ids (Sequence[str]):
1144+
List of acknowledgement IDs that were
1145+
malformed or whose acknowledgement deadline has
1146+
expired.
1147+
unordered_ack_ids (Sequence[str]):
1148+
List of acknowledgement IDs that were out of
1149+
order.
1150+
"""
1151+
1152+
ack_ids = proto.RepeatedField(proto.STRING, number=1,)
1153+
invalid_ack_ids = proto.RepeatedField(proto.STRING, number=2,)
1154+
unordered_ack_ids = proto.RepeatedField(proto.STRING, number=3,)
1155+
1156+
class ModifyAckDeadlineConfirmation(proto.Message):
1157+
r"""Acknowledgement IDs sent in one or more previous requests to
1158+
modify the deadline for a specific message.
1159+
1160+
Attributes:
1161+
ack_ids (Sequence[str]):
1162+
Successfully processed acknowledgement IDs.
1163+
invalid_ack_ids (Sequence[str]):
1164+
List of acknowledgement IDs that were
1165+
malformed or whose acknowledgement deadline has
1166+
expired.
1167+
"""
1168+
1169+
ack_ids = proto.RepeatedField(proto.STRING, number=1,)
1170+
invalid_ack_ids = proto.RepeatedField(proto.STRING, number=2,)
1171+
11301172
class SubscriptionProperties(proto.Message):
11311173
r"""Subscription properties sent as part of the response.
11321174
11331175
Attributes:
1176+
exactly_once_delivery_enabled (bool):
1177+
True iff exactly once delivery is enabled for
1178+
this subscription.
11341179
message_ordering_enabled (bool):
11351180
True iff message ordering is enabled for this
11361181
subscription.
11371182
"""
11381183

1184+
exactly_once_delivery_enabled = proto.Field(proto.BOOL, number=1,)
11391185
message_ordering_enabled = proto.Field(proto.BOOL, number=2,)
11401186

11411187
received_messages = proto.RepeatedField(
11421188
proto.MESSAGE, number=1, message="ReceivedMessage",
11431189
)
1190+
acknowlege_confirmation = proto.Field(
1191+
proto.MESSAGE, number=2, message=AcknowledgeConfirmation,
1192+
)
1193+
modify_ack_deadline_confirmation = proto.Field(
1194+
proto.MESSAGE, number=3, message=ModifyAckDeadlineConfirmation,
1195+
)
11441196
subscription_properties = proto.Field(
11451197
proto.MESSAGE, number=4, message=SubscriptionProperties,
11461198
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.