Cloud PubSub V1 Client - Class PullResponse (2.2.1)

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

Response for the Pull method.

Generated from protobuf message google.pubsub.v1.PullResponse

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ received_messages array<Google\Cloud\PubSub\V1\ReceivedMessage>

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

getReceivedMessages

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setReceivedMessages

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

Parameter
Name Description
var array<Google\Cloud\PubSub\V1\ReceivedMessage>
Returns
Type Description
$this