public static final class DeadLetterPolicy.Builder extends GeneratedMessage.Builder<DeadLetterPolicy.Builder> implements DeadLetterPolicyOrBuilderDead 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > DeadLetterPolicy.BuilderImplements
DeadLetterPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public DeadLetterPolicy build()| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy |
|
buildPartial()
public DeadLetterPolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy |
|
clear()
public DeadLetterPolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
|
clearDeadLetterTopic()
public DeadLetterPolicy.Builder clearDeadLetterTopic() Optional. The name of the topic to which dead letter messages should be
published. Format is projects/{project}/topics/{topic}.The 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
This builder for chaining. |
clearMaxDeliveryAttempts()
public DeadLetterPolicy.Builder clearMaxDeliveryAttempts()Optional. 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 acknowledgment 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
This builder for chaining. |
getDeadLetterTopic()
public String getDeadLetterTopic() Optional. The name of the topic to which dead letter messages should be
published. Format is projects/{project}/topics/{topic}.The 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The deadLetterTopic. |
getDeadLetterTopicBytes()
public ByteString getDeadLetterTopicBytes() Optional. The name of the topic to which dead letter messages should be
published. Format is projects/{project}/topics/{topic}.The 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for deadLetterTopic. |
getDefaultInstanceForType()
public DeadLetterPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getMaxDeliveryAttempts()
public int getMaxDeliveryAttempts()Optional. 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 acknowledgment 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The maxDeliveryAttempts. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public DeadLetterPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public DeadLetterPolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
|
mergeFrom(DeadLetterPolicy other)
public DeadLetterPolicy.Builder mergeFrom(DeadLetterPolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
DeadLetterPolicy |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
|
setDeadLetterTopic(String value)
public DeadLetterPolicy.Builder setDeadLetterTopic(String value) Optional. The name of the topic to which dead letter messages should be
published. Format is projects/{project}/topics/{topic}.The 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe deadLetterTopic to set. |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
This builder for chaining. |
setDeadLetterTopicBytes(ByteString value)
public DeadLetterPolicy.Builder setDeadLetterTopicBytes(ByteString value) Optional. The name of the topic to which dead letter messages should be
published. Format is projects/{project}/topics/{topic}.The 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for deadLetterTopic to set. |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
This builder for chaining. |
setMaxDeliveryAttempts(int value)
public DeadLetterPolicy.Builder setMaxDeliveryAttempts(int value)Optional. 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 acknowledgment 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe maxDeliveryAttempts to set. |
| Returns | |
|---|---|
| Type | Description |
DeadLetterPolicy.Builder |
This builder for chaining. |