Skip to content

Commit 30fcd3f

Browse files
fix: Replace unreleased InitialSubscribeRequest initial_cursor field with initial_location (#150)
1 parent ab3fd7f commit 30fcd3f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

google/cloud/pubsublite_v1/types/subscriber.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,16 @@ class InitialSubscribeRequest(proto.Message):
5050
The partition from which to receive messages. Partitions are
5151
zero indexed, so ``partition`` must be in the range [0,
5252
topic.num_partitions).
53-
initial_cursor (google.cloud.pubsublite_v1.types.Cursor):
54-
Optional. Initial stream delivery cursor,
55-
pointing to anywhere in the topic partition.
56-
Cursors past head result in stream breakage. If
57-
not set, messages will be delivered from the
58-
commit cursor for the given subscription and
59-
partition.
53+
initial_location (google.cloud.pubsublite_v1.types.SeekRequest):
54+
Optional. Initial target location within the
55+
message backlog. If not set, messages will be
56+
delivered from the commit cursor for the given
57+
subscription and partition.
6058
"""
6159

6260
subscription = proto.Field(proto.STRING, number=1,)
6361
partition = proto.Field(proto.INT64, number=2,)
64-
initial_cursor = proto.Field(proto.MESSAGE, number=3, message=common.Cursor,)
62+
initial_location = proto.Field(proto.MESSAGE, number=4, message="SeekRequest",)
6563

6664

6765
class InitialSubscribeResponse(proto.Message):
@@ -79,9 +77,11 @@ class InitialSubscribeResponse(proto.Message):
7977
class SeekRequest(proto.Message):
8078
r"""Request to update the stream's delivery cursor based on the
8179
given target. Resets the server available tokens to 0.
80+
SeekRequests past head result in stream breakage.
81+
8282
SeekRequests may not be sent while another SeekRequest is
8383
outstanding (i.e., has not received a SeekResponse) on the same
84-
stream. SeekRequests past head result in stream breakage.
84+
stream.
8585
8686
Attributes:
8787
named_target (google.cloud.pubsublite_v1.types.SeekRequest.NamedTarget):

0 commit comments

Comments
 (0)