frankjkelly edited a comment on issue #9020:
URL: https://github.com/apache/pulsar/issues/9020#issuecomment-763178272


   I retried with the command line tools for Pulsar 2.6.1 ensuring that the 
subscriber name was new each time and was able to reproduce the behavior
   
   ```
   17:13:18.081 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ClientCnx - 
[pulsar.saas-dev.cogitocorp.us/54.82.124.115:7443] Broker notification reached 
the end of topic: 0
   17:13:18.081 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - [subcriber5] 
[persistent://cogito-dialog/wav/test5] [48326] Consumer has reached the end of 
topic
   ```
   
   **TEST CASE 1: No Terminate**
   Producer
   ```
   $ ./pulsar-client --url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 
--proxy-url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 --proxy-protocol 
SNI produce persistent://cogito-dialog/wav/testNoTerminate -f 
~/platform2-signal/signal-stream-client-library/src/intTest/resources/python.wav
   ```
   
   Consumer
   ```
   $ ./pulsar-client --url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 
--proxy-url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 --proxy-protocol 
SNI consume -p Earliest -s subcriberNoTerminate 
persistent://cogito-dialog/wav/testNoTerminate -t Shared    
   ```
   Response
   ```
   17:15:31.672 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://cogito-dialog/wav/testNoTerminate][subcriberNoTerminate] 
Subscribing to topic on cnx [id: 0x4a36f046, L:/10.250.8.90:62168 - 
R:pulsar.saas-dev.cogitocorp.us/3.217.29.231:7443]
   17:15:31.725 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://cogito-dialog/wav/testNoTerminate][subcriberNoTerminate] 
Subscribed to topic on pulsar.saas-dev.cogitocorp.us/3.217.29.231:7443 -- 
consumer: 0
   ```
   
   **TEST CASE 2: Include Terminate**
   Producer
   ```
   $ ./pulsar-client --url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 
--proxy-url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 --proxy-protocol 
SNI produce persistent://cogito-dialog/wav/testWithTerminate -f 
~/platform2-signal/signal-stream-client-library/src/intTest/resources/python.wav
   ```
   
   Termination
   ```
   $ ./apache-pulsar-2.6.1/bin/pulsar-admin --admin-url 
http://platform-pulsar-broker:8080 topics terminate  
persistent://cogito-dialog/wav/testWithTerminate
   Warning: Nashorn engine is planned to be removed from a future JDK release
   Topic succesfully terminated at 951286:0:-1
   ```
   
   Consumer
   ```
   $ ./pulsar-client --url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 
--proxy-url pulsar+ssl://pulsar.saas-dev.cogitocorp.us:7443 --proxy-protocol 
SNI consume -p Earliest -s subcriberWithTerminate 
persistent://cogito-dialog/wav/testWithTerminate -t Shared
   ```
   
   Response
   ```
   17:17:42.151 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://cogito-dialog/wav/testWithTerminate][subcriberWithTerminate] 
Subscribing to topic on cnx [id: 0x2e169889, L:/10.250.8.90:62185 - 
R:pulsar.saas-dev.cogitocorp.us/54.82.124.115:7443]
   17:17:42.293 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://cogito-dialog/wav/testWithTerminate][subcriberWithTerminate] 
Subscribed to topic on pulsar.saas-dev.cogitocorp.us/54.82.124.115:7443 -- 
consumer: 0
   17:17:42.477 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ClientCnx - 
[pulsar.saas-dev.cogitocorp.us/54.82.124.115:7443] Broker notification reached 
the end of topic: 0
   17:17:42.478 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - [subcriberWithTerminate] 
[persistent://cogito-dialog/wav/testWithTerminate] [be3a5] Consumer has reached 
the end of topic
   ```
   
   NOTE: If I do the reset-cursor
   ```
   $ ./apache-pulsar-2.6.1/bin/pulsar-admin --admin-url 
http://platform-pulsar-broker:8080 topics reset-cursor  
persistent://cogito-dialog/wav/testWithTerminate -s subcriberWithTerminate -t 2d
   ```
   
   I *do* get data back
   But again it seems *surprising* that a new subscription, created after topic 
termination, needs to have its cursor reset


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