BewareMyPower commented on code in PR #24020:
URL: https://github.com/apache/pulsar/pull/24020#discussion_r1976970333
##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/DeadLetterPolicy.java:
##########
@@ -62,4 +63,16 @@ public class DeadLetterPolicy implements Serializable {
* to be created.
*/
private String initialSubscriptionName;
+
+ /**
+ * Function to build the producer for the retry letter topic.
+ * The input parameter is the topic name.
+ */
+ private Function<String, ProducerBuilder<byte[]>>
retryLetterProducerBuilder;
+
+ /**
+ * Function to build the producer for the dead letter topic.
+ * The input parameter is the topic name.
+ */
+ private Function<String, ProducerBuilder<byte[]>>
deadLetterProducerBuilder;
Review Comment:
> One possibility would be to also return a builder so that the builder
instance could be completely switched.
That makes sense to me. Passing a `ProducerBuilder` can keep the immutable
fields (`client`) still immutable.
BTW, @thetumbled once the design is updated, please update the PIP document
to make it consistent with the latest design
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]