Service Client: Google::Cloud::Pubsublite::V1::Publisher::PublisherServiceClient

Client stub representing the remote PublisherService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to pubsublite.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Pubsublite::V1::Publisher - Compiled Protocol Buffers messages for google/cloud/pubsublite/v1/publisher.proto

SYNOPSIS

use Google::Cloud::Pubsublite::V1::Publisher;

my $msg = Google::Cloud::Pubsublite::V1::Publisher::InitialPublishRequest->new({
    topic => $topic,
    partition => $partition,
    client_id => $client_id,
});

# Read or update a field
my $val = $msg->topic();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Pubsublite::V1::Publisher::InitialPublishRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/pubsublite/v1/publisher.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Pubsublite::V1::Publisher::InitialPublishRequest

The first request that must be sent on a newly-opened stream.

Inherits from Protobuf::Message.

Accessors

  • $msg->topic() / $msg->topic($value)

    Type: String

    The topic to which messages will be written.

  • $msg->partition() / $msg->partition($value)

    Type: Int64

    The partition within the topic to which messages will be written. Partitions are zero indexed, so `partition` must be in the range [0, topic.num_partitions).

  • $msg->client_id() / $msg->client_id($value)

    Type: Bytes

    Unique identifier for a publisher client. If set, enables publish idempotency within a publisher client session.

    The length of this field must be exactly 16 bytes long and should be populated with a 128 bit uuid, generated by standard uuid algorithms like uuid1 or uuid4. The same identifier should be reused following disconnections with retryable stream errors.

Google::Cloud::Pubsublite::V1::Publisher::InitialPublishResponse

Response to an InitialPublishRequest.

Inherits from Protobuf::Message.

Google::Cloud::Pubsublite::V1::Publisher::MessagePublishRequest

Request to publish messages to the topic.

Inherits from Protobuf::Message.

Accessors

  • $msg->messages() / $msg->messages($value)

    Type: Message (Google::Cloud::Pubsublite::V1::Common::PubSubMessage)

    The messages to publish.

  • $msg->first_sequence_number() / $msg->first_sequence_number($value)

    Type: Int64

    The sequence number corresponding to the first message in `messages`. Messages within a batch are ordered and the sequence numbers of all subsequent messages in the batch are assumed to be incremental.

    Sequence numbers are assigned at the message level and the first message published in a publisher client session must have a sequence number of 0. All messages must have contiguous sequence numbers, which uniquely identify the messages accepted by the publisher client. Since messages are ordered, the client only needs to specify the sequence number of the first message in a published batch. The server deduplicates messages with the same sequence number from the same publisher `client_id`.

Google::Cloud::Pubsublite::V1::Publisher::MessagePublishResponse

Response to a MessagePublishRequest.

Inherits from Protobuf::Message.

Accessors

  • $msg->start_cursor() / $msg->start_cursor($value)

    Type: Message (Google::Cloud::Pubsublite::V1::Common::Cursor)

    The cursor of the first published message in the batch. The cursors for any remaining messages in the batch are guaranteed to be sequential.

  • $msg->cursor_ranges() / $msg->cursor_ranges($value)

    Type: Message (Google::Cloud::Pubsublite::V1::Publisher::MessagePublishResponse::CursorRange)

    Cursors for messages published in the batch. There will exist multiple ranges when cursors are not contiguous within the batch.

    The cursor ranges may not account for all messages in the batch when publish idempotency is enabled. A missing range indicates that cursors could not be determined for messages within the range, as they were deduplicated and the necessary data was not available at publish time. These messages will have offsets when received by a subscriber.

Google::Cloud::Pubsublite::V1::Publisher::PublishRequest

Request sent from the client to the server on a stream.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Pubsublite::V1::Publisher::PublishResponse

Response to a PublishRequest.

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Pubsublite::V1::Publisher::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.