Cloud PubSub V1 Client - Class MessageStoragePolicy (1.41.3)

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

A policy constraining the storage of messages published to the topic.

Generated from protobuf message google.pubsub.v1.MessageStoragePolicy

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ allowed_persistence_regions array

A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.

getAllowedPersistenceRegions

A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAllowedPersistenceRegions

A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this