public sealed class MessageStoragePolicy : IMessage<MessageStoragePolicy>, IEquatable<MessageStoragePolicy>, IDeepCloneable<MessageStoragePolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Pub/Sub v1 API class MessageStoragePolicy.
A policy constraining the storage of messages published to the topic.
public RepeatedField<string> AllowedPersistenceRegions { get; }
Optional. A list of IDs of Google Cloud regions where messages that are
published to the topic may be persisted in storage. Messages published by
publishers running in non-allowed Google Cloud regions (or running outside
of Google Cloud altogether) are routed for storage in one of the allowed
regions. An empty list means that no regions are allowed, and is not a
valid configuration.
Optional. If true, allowed_persistence_regions is also used to enforce
in-transit guarantees for messages. That is, Pub/Sub will fail
Publish operations on this topic and subscribe operations
on any subscription attached to this topic in any region that is
not in allowed_persistence_regions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for the \u003ccode\u003eMessageStoragePolicy\u003c/code\u003e class is 3.23.0, while the current page is displaying documentation for version 3.14.0, with many other versions listed as well.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMessageStoragePolicy\u003c/code\u003e class, part of the Google Cloud Pub/Sub v1 API, is used to define constraints on how messages published to a topic are stored.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, within the \u003ccode\u003eGoogle.Cloud.PubSub.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMessageStoragePolicy\u003c/code\u003e includes properties like \u003ccode\u003eAllowedPersistenceRegions\u003c/code\u003e, a list of Google Cloud regions for message storage, and \u003ccode\u003eEnforceInTransit\u003c/code\u003e, a boolean for enforcing in-transit guarantees.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors available for \u003ccode\u003eMessageStoragePolicy\u003c/code\u003e, a parameterless one, and one that accepts another \u003ccode\u003eMessageStoragePolicy\u003c/code\u003e as a parameter.\u003c/p\u003e\n"]]],[],null,[]]