massakam commented on a change in pull request #12401:
URL: https://github.com/apache/pulsar/pull/12401#discussion_r744484410



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -145,42 +147,67 @@ private void start(List<Integer> indexList) {
         AtomicReference<Throwable> createFail = new 
AtomicReference<Throwable>();
         AtomicInteger completed = new AtomicInteger();
 
-        for (int partitionIndex : indexList) {
-            
createProducer(partitionIndex).producerCreatedFuture().handle((prod, 
createException) -> {
-                if (createException != null) {
-                    setState(State.Failed);
-                    createFail.compareAndSet(null, createException);
+        final BiConsumer<Boolean, Throwable> after = (failFast, 
createException) -> {

Review comment:
       ```suggestion
           final BiConsumer<Boolean, Throwable> afterCreatingProducer = 
(failFast, createException) -> {
   ```




-- 
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]


Reply via email to