public static final class DeadLetterPolicy.Builder extends 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public DeadLetterPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public DeadLetterPolicy build()
buildPartial()
public DeadLetterPolicy buildPartial()
clear()
public DeadLetterPolicy.Builder clear()
Overrides
clearDeadLetterTopic()
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;
clearField(Descriptors.FieldDescriptor field)
public DeadLetterPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearMaxDeliveryAttempts()
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public DeadLetterPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public DeadLetterPolicy.Builder clone()
Overrides
getDeadLetterTopic()
public 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;
Returns |
---|
Type | Description |
String | The deadLetterTopic.
|
getDeadLetterTopicBytes()
public 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;
Returns |
---|
Type | Description |
ByteString | The bytes for deadLetterTopic.
|
getDefaultInstanceForType()
public DeadLetterPolicy getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getMaxDeliveryAttempts()
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;
Returns |
---|
Type | Description |
int | The maxDeliveryAttempts.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
public DeadLetterPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public DeadLetterPolicy.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeFrom(DeadLetterPolicy other)
public DeadLetterPolicy.Builder mergeFrom(DeadLetterPolicy other)
mergeUnknownFields(UnknownFieldSet unknownFields)
public final DeadLetterPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setDeadLetterTopic(String value)
public 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;
Parameter |
---|
Name | Description |
value | String
The deadLetterTopic to set.
|
setDeadLetterTopicBytes(ByteString value)
public DeadLetterPolicy.Builder setDeadLetterTopicBytes(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;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for deadLetterTopic to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public DeadLetterPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setMaxDeliveryAttempts(int value)
public 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;
Parameter |
---|
Name | Description |
value | int
The maxDeliveryAttempts to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public DeadLetterPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final DeadLetterPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides