mattisonchao edited a comment on pull request #11089:
URL: https://github.com/apache/pulsar/pull/11089#issuecomment-868292138


   If the first subscription status returns faster than the second 
subscription, the second subscription will always return `sendSuccessResponse`, 
because the first subscription is completed and will not cause an exception, 
then they will enter this if branch:
   ```java
   ServerCnx.java  953:961
   
                            if (existingConsumerFuture != null) {
                               if (existingConsumerFuture.isDone() && 
!existingConsumerFuture.isCompletedExceptionally()) {
                                   Consumer consumer = 
existingConsumerFuture.getNow(null);
                                   log.info("[{}] Consumer with the same id is 
already created:"
                                            + " consumerId={}, consumer={}",
                                            remoteAddress, consumerId, 
consumer);
                                   commandSender.sendSuccessResponse(requestId);
                                   return null;
                               } else { //... some code}
   ```
   So I don’t think we need Awaitility,
   
   Do I understand it right? : )


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to