public static final class DeadLetterPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder> implements DeadLetterPolicyOrBuilder
Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.Protobuf type
google.pubsub.v1.DeadLetterPolicy| Modifier and Type | Method and Description |
|---|---|
DeadLetterPolicy.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
DeadLetterPolicy |
build() |
DeadLetterPolicy |
buildPartial() |
DeadLetterPolicy.Builder |
clear() |
DeadLetterPolicy.Builder |
clearDeadLetterTopic()
The name of the topic to which dead letter messages should be published.
|
DeadLetterPolicy.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
DeadLetterPolicy.Builder |
clearMaxDeliveryAttempts()
The maximum number of delivery attempts for any message.
|
DeadLetterPolicy.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
DeadLetterPolicy.Builder |
clone() |
String |
getDeadLetterTopic()
The name of the topic to which dead letter messages should be published.
|
com.google.protobuf.ByteString |
getDeadLetterTopicBytes()
The name of the topic to which dead letter messages should be published.
|
DeadLetterPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getMaxDeliveryAttempts()
The maximum number of delivery attempts for any message.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
DeadLetterPolicy.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
DeadLetterPolicy.Builder |
mergeFrom(DeadLetterPolicy other) |
DeadLetterPolicy.Builder |
mergeFrom(com.google.protobuf.Message other) |
DeadLetterPolicy.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
DeadLetterPolicy.Builder |
setDeadLetterTopic(String value)
The name of the topic to which dead letter messages should be published.
|
DeadLetterPolicy.Builder |
setDeadLetterTopicBytes(com.google.protobuf.ByteString value)
The name of the topic to which dead letter messages should be published.
|
DeadLetterPolicy.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
DeadLetterPolicy.Builder |
setMaxDeliveryAttempts(int value)
The maximum number of delivery attempts for any message.
|
DeadLetterPolicy.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
DeadLetterPolicy.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic DeadLetterPolicy build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic DeadLetterPolicy buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic DeadLetterPolicy.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder mergeFrom(DeadLetterPolicy other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public DeadLetterPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeadLetterPolicy.Builder>IOExceptionpublic String getDeadLetterTopic()
The name of the topic to which dead letter messages should be published.
Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
account associated with the enclosing subscription's parent project (i.e.,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
permission to Publish() to this topic.
The operation will fail if the topic does not exist.
Users should ensure that there is a subscription attached to this topic
since messages published to a topic with no subscriptions are lost.
string dead_letter_topic = 1;getDeadLetterTopic in interface DeadLetterPolicyOrBuilderpublic com.google.protobuf.ByteString getDeadLetterTopicBytes()
The name of the topic to which dead letter messages should be published.
Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
account associated with the enclosing subscription's parent project (i.e.,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
permission to Publish() to this topic.
The operation will fail if the topic does not exist.
Users should ensure that there is a subscription attached to this topic
since messages published to a topic with no subscriptions are lost.
string dead_letter_topic = 1;getDeadLetterTopicBytes in interface DeadLetterPolicyOrBuilderpublic DeadLetterPolicy.Builder setDeadLetterTopic(String value)
The name of the topic to which dead letter messages should be published.
Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
account associated with the enclosing subscription's parent project (i.e.,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
permission to Publish() to this topic.
The operation will fail if the topic does not exist.
Users should ensure that there is a subscription attached to this topic
since messages published to a topic with no subscriptions are lost.
string dead_letter_topic = 1;value - The deadLetterTopic to set.public DeadLetterPolicy.Builder clearDeadLetterTopic()
The name of the topic to which dead letter messages should be published.
Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
account associated with the enclosing subscription's parent project (i.e.,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
permission to Publish() to this topic.
The operation will fail if the topic does not exist.
Users should ensure that there is a subscription attached to this topic
since messages published to a topic with no subscriptions are lost.
string dead_letter_topic = 1;public DeadLetterPolicy.Builder setDeadLetterTopicBytes(com.google.protobuf.ByteString value)
The name of the topic to which dead letter messages should be published.
Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
account associated with the enclosing subscription's parent project (i.e.,
service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
permission to Publish() to this topic.
The operation will fail if the topic does not exist.
Users should ensure that there is a subscription attached to this topic
since messages published to a topic with no subscriptions are lost.
string dead_letter_topic = 1;value - The bytes for deadLetterTopic to set.public int getMaxDeliveryAttempts()
The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
int32 max_delivery_attempts = 2;getMaxDeliveryAttempts in interface DeadLetterPolicyOrBuilderpublic DeadLetterPolicy.Builder setMaxDeliveryAttempts(int value)
The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
int32 max_delivery_attempts = 2;value - The maxDeliveryAttempts to set.public DeadLetterPolicy.Builder clearMaxDeliveryAttempts()
The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
int32 max_delivery_attempts = 2;public final DeadLetterPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>public final DeadLetterPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeadLetterPolicy.Builder>Copyright © 2022 Google LLC. All rights reserved.