You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/10 09:45:14 UTC

[GitHub] [pulsar] Technoboy- commented on a change in pull request #13355: [PIP-124] Create init subscription before sending message to DLQ

Technoboy- commented on a change in pull request #13355:
URL: https://github.com/apache/pulsar/pull/13355#discussion_r803483159



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1245,9 +1254,33 @@ protected void handleProducer(final CommandProducer cmdProducer) {
 
                     schemaVersionFuture.thenAccept(schemaVersion -> {
                         topic.checkIfTransactionBufferRecoverCompletely(isTxnEnabled).thenAccept(future -> {
-                            buildProducerAndAddTopic(topic, producerId, producerName, requestId, isEncrypted,
+                            CompletableFuture<Subscription> createInitSubFuture = new CompletableFuture<>();
+                            if (!Strings.isNullOrEmpty(initialSubscriptionName)
+                                    && !topic.getSubscriptions().containsKey(initialSubscriptionName)
+                                    && topic.isPersistent()) {

Review comment:
       Put `topic.isPersistent()` as the first or second param may be better
                                      




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org