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 2020/11/12 17:30:43 UTC

[GitHub] [pulsar] nha opened a new issue #8547: java client: expose endOfTopic event listener

nha opened a new issue #8547:
URL: https://github.com/apache/pulsar/issues/8547


   **Is your enhancement request related to a problem? Please describe.**
   
   In the pulsar java client, allow registering a listener for the `endOfTopic` event that can be used when calling `.receive`-style calls without having to use a `messageListener`.
   
   From https://pulsar.apache.org/api/client/org/apache/pulsar/client/api/ConsumerBuilder.html#messageListener-org.apache.pulsar.client.api.MessageListener-
   (emphasis mine)
   > When a MessageListener is set, application will receive messages through it.
   > **Calls to Consumer.receive() will not be allowed.**
   
   
   **Describe the solution you'd like**
   Setting another listener only for `endOfTopic` events in the `ConsumerBuilder`
   
   **Describe alternatives you've considered**
   I cannot think of an alternative.
   
   **Additional context**
   https://github.com/apache/pulsar/blob/db6afd52841108b0c35f0a0bdd0759f5243d93e0/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java#L141-L144
   


----------------------------------------------------------------
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] nha closed issue #8547: java client: expose endOfTopic event listener

Posted by GitBox <gi...@apache.org>.
nha closed issue #8547:
URL: https://github.com/apache/pulsar/issues/8547


   


----------------------------------------------------------------
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] nha edited a comment on issue #8547: java client: expose endOfTopic event listener

Posted by GitBox <gi...@apache.org>.
nha edited a comment on issue #8547:
URL: https://github.com/apache/pulsar/issues/8547#issuecomment-726321252


   Closing following the discussion on Slack, I can use the `TopicTerminatedException` instead.
   
   <img width="1087" alt="Screen Shot 2020-11-12 at 20 26 15" src="https://user-images.githubusercontent.com/1968291/98992704-685ee800-2525-11eb-82df-6d5bac1e01e3.png">
   <img width="1116" alt="Screen Shot 2020-11-12 at 20 26 26" src="https://user-images.githubusercontent.com/1968291/98992742-744aaa00-2525-11eb-91b2-666cd1dc4fbf.png">
   


----------------------------------------------------------------
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] nha commented on issue #8547: java client: expose endOfTopic event listener

Posted by GitBox <gi...@apache.org>.
nha commented on issue #8547:
URL: https://github.com/apache/pulsar/issues/8547#issuecomment-726321252


   Closing following the discussion on Slack, I can use the `TopicTerminatedException` instead.


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