Cloud PubSub V1 Client - Class AcknowledgeRequest (2.4.0)

Reference documentation and code samples for the Cloud PubSub V1 Client class AcknowledgeRequest.

Request for the Acknowledge method.

Generated from protobuf message google.pubsub.v1.AcknowledgeRequest

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ subscription string

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

↳ ack_ids array

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

getSubscription

Required. The subscription whose message is being acknowledged.

Format is projects/{project}/subscriptions/{sub}.

Returns
Type Description
string

setSubscription

Required. The subscription whose message is being acknowledged.

Format is projects/{project}/subscriptions/{sub}.

Parameter
Name Description
var string
Returns
Type Description
$this

getAckIds

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAckIds

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

Parameter
Name Description
var string[]
Returns
Type Description
$this

static::build

Parameters
Name Description
subscription string

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}. Please see Google\Cloud\PubSub\V1\SubscriberClient::subscriptionName() for help formatting this field.

ackIds string[]

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

Returns
Type Description
Google\Cloud\PubSub\V1\AcknowledgeRequest

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.