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
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public DeadLetterPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public DeadLetterPolicy build()
Returns
buildPartial()
public DeadLetterPolicy buildPartial()
Returns
clear()
public DeadLetterPolicy.Builder clear()
Returns
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;
Returns
clearField(Descriptors.FieldDescriptor field)
public DeadLetterPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public DeadLetterPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public DeadLetterPolicy.Builder clone()
Returns
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()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public DeadLetterPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public DeadLetterPolicy.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(DeadLetterPolicy other)
public DeadLetterPolicy.Builder mergeFrom(DeadLetterPolicy other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final DeadLetterPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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.
|
Returns
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.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public DeadLetterPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public DeadLetterPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final DeadLetterPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides