class PullRequest extends Message

Request for the Pull method.

Protobuf type Google\Pubsub\V1\PullRequest

Methods

__construct()

No description

string
getSubscription()

The subscription from which messages should be pulled.

setSubscription(string $var)

The subscription from which messages should be pulled.

bool
getReturnImmediately()

If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response.

setReturnImmediately(bool $var)

If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response.

int
getMaxMessages()

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

setMaxMessages(int $var)

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

Details

at line 44
__construct()

at line 56
string getSubscription()

The subscription from which messages should be pulled.

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

Generated from protobuf field string subscription = 1;

Return Value

string

at line 68
setSubscription(string $var)

The subscription from which messages should be pulled.

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

Generated from protobuf field string subscription = 1;

Parameters

string $var

at line 85
bool getReturnImmediately()

If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response.

Otherwise, the system may wait (for a bounded amount of time) 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.

Generated from protobuf field bool return_immediately = 2;

Return Value

bool

at line 101
setReturnImmediately(bool $var)

If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response.

Otherwise, the system may wait (for a bounded amount of time) 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.

Generated from protobuf field bool return_immediately = 2;

Parameters

bool $var

at line 114
int getMaxMessages()

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

Generated from protobuf field int32 max_messages = 3;

Return Value

int

at line 126
setMaxMessages(int $var)

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

Generated from protobuf field int32 max_messages = 3;

Parameters

int $var