lhotari commented on code in PR #24020:
URL: https://github.com/apache/pulsar/pull/24020#discussion_r1981034208
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -2294,17 +2295,16 @@ private CompletableFuture<Producer<byte[]>>
initDeadLetterProducerIfNeeded() {
p = deadLetterProducer;
if (p == null || p.isCompletedExceptionally()) {
p = createProducerWithBackOff(() -> {
- CompletableFuture<Producer<byte[]>> newProducer =
- ((ProducerBuilderImpl<byte[]>)
client.newProducer(Schema.AUTO_PRODUCE_BYTES(schema)))
-
.initialSubscriptionName(this.deadLetterPolicy.getInitialSubscriptionName())
-
.topic(this.deadLetterPolicy.getDeadLetterTopic())
- .producerName(
-
String.format("%s-%s-%s-%s-DLQ", this.topicName, this.subscription,
- this.consumerName,
RandomStringUtils.randomAlphanumeric(5)))
- .blockIfQueueFull(false)
- .enableBatching(false)
- .enableChunking(true)
Review Comment:
@thetumbled I pushed directly to this PR, f353e02. There was another issue
that the ProducerBuilderContextImpl was in the wrong package. This is a class
that should be kept private in the same package as ConsumerImpl. It could even
be a private inner class in ConsumerImpl, there's no value in reusing it.
--
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]