BewareMyPower commented on issue #7726:
URL: https://github.com/apache/pulsar/issues/7726#issuecomment-668942839


   The point is, at the first step:
   
   > I start C1 first, then C2. 
   
   C2 could consume messages as the log says. Also I use Ctrl+C to kill the 
process, Even without it, the `client.close()` could never been reached because 
there's no way to break my loop.
   
   The full log of C2 (while C1 has started before) is:
   
   ```
   $ ./examples/SampleConsumer 2 3
   2020-08-05 10:34:23.403 INFO  [140077698222624] ConnectionPool:85 | Created 
connection for pulsar://localhost:6650
   2020-08-05 10:34:23.405 INFO  [140077624579840] ClientConnection:343 | 
[127.0.0.1:59990 -> 127.0.0.1:6650] Connected to broker
   2020-08-05 10:34:23.415 INFO  [140077624579840] HandlerBase:53 | 
[persistent://public/default/ParTopic-partition-3, SubscriptionName, 0] Getting 
connection from pool
   2020-08-05 10:34:23.417 INFO  [140077624579840] HandlerBase:53 | 
[persistent://public/default/ParTopic-partition-2, SubscriptionName, 1] Getting 
connection from pool
   2020-08-05 10:34:23.417 INFO  [140077624579840] ConsumerImpl:199 | 
[persistent://public/default/ParTopic-partition-3, SubscriptionName, 0] Created 
consumer on broker [127.0.0.1:59990 -> 127.0.0.1:6650] 
   2020-08-05 10:34:23.418 INFO  [140077624579840] ConsumerImpl:199 | 
[persistent://public/default/ParTopic-partition-2, SubscriptionName, 1] Created 
consumer on broker [127.0.0.1:59990 -> 127.0.0.1:6650] 
   2020-08-05 10:34:23.418 INFO  [140077624579840] MultiTopicsConsumerImpl:99 | 
Successfully Subscribed to Topics
   [2] 160bbbb, key: 20000, id: (45337,159,-1,0)
   // ...
   [2] 176bbbb, key: 20000, id: (45337,175,-1,0)
   ^C
   ```


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