#include <DeadLetterPolicyBuilder.h>
The builder to build a DeadLetterPolicyBuilder
Example of building DeadLetterPolicy:
++
Definition DeadLetterPolicyBuilder.h:44
DeadLetterPolicyBuilder & deadLetterTopic(const std::string &deadLetterTopic)
DeadLetterPolicyBuilder & initialSubscriptionName(const std::string &initialSubscriptionName)
DeadLetterPolicyBuilder & maxRedeliverCount(int maxRedeliverCount)
Definition DeadLetterPolicy.h:36
◆ build()
◆ deadLetterTopic()
Set dead letter topic.
- Parameters
-
deadLetterTopic | Name of the dead topic where the failing messages are sent. The default value is: sourceTopicName + "-" + subscriptionName + "-DLQ" |
- Returns
◆ initialSubscriptionName()
DeadLetterPolicyBuilder & pulsar::DeadLetterPolicyBuilder::initialSubscriptionName |
( |
const std::string & |
initialSubscriptionName | ) |
|
Set initial subscription name
- Parameters
-
initialSubscriptionName | Name of the initial subscription name of the dead letter topic. If this field is not set, the initial subscription for the dead letter topic is not created. If this field is set but the broker's allowAutoSubscriptionCreation is disabled, the DLQ producer fails to be created. |
- Returns
◆ maxRedeliverCount()
Set max redeliver count
- Parameters
-
maxRedeliverCount | Maximum number of times that a message is redelivered before being sent to the dead letter queue.
- The maxRedeliverCount must be greater than 0.
- The default value is {INT_MAX} (DLQ is not enabled)
|
- Returns
The documentation for this class was generated from the following file: