Service Client: Google::Pubsub::V1beta2::Pubsub::SubscriberClient

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

target

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

credentials

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

Service Client: Google::Pubsub::V1beta2::Pubsub::PublisherClient

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

target

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

credentials

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

NAME

Google::Pubsub::V1beta2::Pubsub - Compiled Protocol Buffers messages for google/pubsub/v1beta2/pubsub.proto

SYNOPSIS

use Google::Pubsub::V1beta2::Pubsub;

my $msg = Google::Pubsub::V1beta2::Pubsub::Topic->new({
    name => $name,
});

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

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Pubsub::V1beta2::Pubsub::Topic->parse($bytes);

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

DESCRIPTION

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

MESSAGES

Google::Pubsub::V1beta2::Pubsub::Topic

A topic resource.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Name of the topic.

Google::Pubsub::V1beta2::Pubsub::PubsubMessage

A message data and its attributes.

Inherits from Protobuf::Message.

Accessors

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

    Type: Bytes

    The message payload. For JSON requests, the value of this field must be base64-encoded.

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::PubsubMessage::AttributesEntry)

    Optional attributes for this message.

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

    Type: String

    ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.

Google::Pubsub::V1beta2::Pubsub::GetTopicRequest

Request for the GetTopic method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the topic to get.

Google::Pubsub::V1beta2::Pubsub::PublishRequest

Request for the Publish method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The messages in the request will be published on this topic.

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::PubsubMessage)

    The messages to publish.

Google::Pubsub::V1beta2::Pubsub::PublishResponse

Response for the Publish method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

Google::Pubsub::V1beta2::Pubsub::ListTopicsRequest

Request for the ListTopics method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the cloud project that topics belong to.

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

    Type: Int32

    Maximum number of topics to return.

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

    Type: String

    The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior ListTopics call, and that the system should return the next page of data.

Google::Pubsub::V1beta2::Pubsub::ListTopicsResponse

Response for the ListTopics method.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::Topic)

    The resulting topics.

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

    Type: String

    If not empty, indicates that there may be more topics that match the request; this value should be passed in a new ListTopicsRequest.

Google::Pubsub::V1beta2::Pubsub::ListTopicSubscriptionsRequest

Request for the ListTopicSubscriptions method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the topic that subscriptions are attached to.

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

    Type: Int32

    Maximum number of subscription names to return.

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

    Type: String

    The value returned by the last ListTopicSubscriptionsResponse; indicates that this is a continuation of a prior ListTopicSubscriptions call, and that the system should return the next page of data.

Google::Pubsub::V1beta2::Pubsub::ListTopicSubscriptionsResponse

Response for the ListTopicSubscriptions method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The names of the subscriptions that match the request.

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

    Type: String

    If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ListTopicSubscriptionsRequest to get more subscriptions.

Google::Pubsub::V1beta2::Pubsub::DeleteTopicRequest

Request for the DeleteTopic method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Name of the topic to delete.

Google::Pubsub::V1beta2::Pubsub::Subscription

A subscription resource.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Name of the subscription.

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

    Type: String

    The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::PushConfig)

    If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

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

    Type: Int32

    This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis).

    For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for a specific message by calling ModifyAckDeadline.

    For push delivery, this value is also used to set the request timeout for the call to the push endpoint.

    If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

Google::Pubsub::V1beta2::Pubsub::PushConfig

Configuration for a push delivery endpoint.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::PushConfig::AttributesEntry)

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1beta2`: uses the push format defined in the v1beta2 Pub/Sub API.

Google::Pubsub::V1beta2::Pubsub::ReceivedMessage

A message and its corresponding acknowledgment ID.

Inherits from Protobuf::Message.

Accessors

Google::Pubsub::V1beta2::Pubsub::GetSubscriptionRequest

Request for the GetSubscription method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the subscription to get.

Google::Pubsub::V1beta2::Pubsub::ListSubscriptionsRequest

Request for the ListSubscriptions method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the cloud project that subscriptions belong to.

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

    Type: Int32

    Maximum number of subscriptions to return.

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

    Type: String

    The value returned by the last ListSubscriptionsResponse; indicates that this is a continuation of a prior ListSubscriptions call, and that the system should return the next page of data.

Google::Pubsub::V1beta2::Pubsub::ListSubscriptionsResponse

Response for the ListSubscriptions method.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::Subscription)

    The subscriptions that match the request.

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

    Type: String

    If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ListSubscriptionsRequest to get more subscriptions.

Google::Pubsub::V1beta2::Pubsub::DeleteSubscriptionRequest

Request for the DeleteSubscription method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The subscription to delete.

Google::Pubsub::V1beta2::Pubsub::ModifyPushConfigRequest

Request for the ModifyPushConfig method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the subscription.

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::PushConfig)

    The push configuration for future deliveries.

    An empty pushConfig indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if Pull is not called.

Google::Pubsub::V1beta2::Pubsub::PullRequest

Request for the Pull method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The subscription from which messages should be pulled.

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

    Type: Bool

    If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.

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

    Type: Int32

    The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.

Google::Pubsub::V1beta2::Pubsub::PullResponse

Response for the Pull method.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Pubsub::V1beta2::Pubsub::ReceivedMessage)

    Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

Google::Pubsub::V1beta2::Pubsub::ModifyAckDeadlineRequest

Request for the ModifyAckDeadline method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The name of the subscription.

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

    Type: String

    The acknowledgment ID.

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

    Type: Int32

    The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request.

Google::Pubsub::V1beta2::Pubsub::AcknowledgeRequest

Request for the Acknowledge method.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    The subscription whose message is being acknowledged.

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

    Type: String

    The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

SEE ALSO

Protobuf, Protobuf::Message, Google::Pubsub::V1beta2::Pubsub::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.