Reference documentation and code samples for the Cloud PubSub V1 Client class State.
Possible states for a subscription.
Protobuf typegoogle.pubsub.v1.Subscription.State
Namespace
Google \ Cloud \ PubSub \ V1 \ Subscription
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
STATE_UNSPECIFIED
Value: 0
Default value. This value is unused.
Generated from protobuf enumSTATE_UNSPECIFIED = 0;
ACTIVE
Value: 1
The subscription can actively receive messages
Generated from protobuf enumACTIVE = 1;
RESOURCE_ERROR
Value: 2
The subscription cannot receive messages because of an error with the
resource to which it pushes messages. See the more detailed error state
in the corresponding configuration.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]