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 2021/01/31 07:40:42 UTC

[GitHub] [pulsar] MarvinCai opened a new pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

MarvinCai opened a new pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381


   Fixes #2687
   
   ### Motivation
   Expose ReachedEndOfTopic in Reader/Consumer API
   
   ### Modifications
   
   Add a request of type `isEndOfTopic` to check if consumer/reader has reached end of topic and send response based on result.
   
   ### Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): no
     - The public API: yes
     - The schema: no
     - The default values of configurations: no
     - The wire protocol: no
     - The rest endpoints: no
     - The admin cli options: no
     - Anything that affects deployment: no
   
   ### Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented?  docs


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-780743357


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-781079476


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on a change in pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#discussion_r577370815



##########
File path: pulsar-websocket/src/main/java/org/apache/pulsar/websocket/ConsumerHandler.java
##########
@@ -84,6 +88,8 @@
     private volatile long msgDeliveredCounter = 0;
     private static final AtomicLongFieldUpdater<ConsumerHandler> MSG_DELIVERED_COUNTER_UPDATER =
             AtomicLongFieldUpdater.newUpdater(ConsumerHandler.class, "msgDeliveredCounter");
+    //default interval for checking if end of topic has been reached is 10 min
+    private static long END_OF_TOPIC_CHECK_INTERVAL = 10 * 60;

Review comment:
       Seems this one not used?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-775562536


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie merged pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on a change in pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on a change in pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#discussion_r577427980



##########
File path: pulsar-websocket/src/main/java/org/apache/pulsar/websocket/ConsumerHandler.java
##########
@@ -84,6 +88,8 @@
     private volatile long msgDeliveredCounter = 0;
     private static final AtomicLongFieldUpdater<ConsumerHandler> MSG_DELIVERED_COUNTER_UPDATER =
             AtomicLongFieldUpdater.newUpdater(ConsumerHandler.class, "msgDeliveredCounter");
+    //default interval for checking if end of topic has been reached is 10 min
+    private static long END_OF_TOPIC_CHECK_INTERVAL = 10 * 60;

Review comment:
       my mistake, was trying to use push mode to notify endOfTopic with periodic check, probably can add that later.
   removed it for now.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-774786813


   @codelipenghui Added unit test, please take another look.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-775512362


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
sijie commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-775759629


   @codelipenghui Can you review it again?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on pull request #9381: Expose ReachedEndOfTopic in Reader/Consumer API

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on pull request #9381:
URL: https://github.com/apache/pulsar/pull/9381#issuecomment-780868044


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org