orpiske commented on PR #7387:
URL: https://github.com/apache/camel/pull/7387#issuecomment-1094779843

   Thanks!
   
   > Hi Great work so far
   > 
   > I think pausing should be possible both manually and automatic. The former 
is to integrate with Camel's existing Lifecycle with the suspend/resume on the 
Camel Service.
   > 
   >     1. manual
   >        KafkaConsumer (from kafka-client) have its own pause/resume API, 
which seems to not be in use. I think camel end users would want camel-kafka to 
use these APIs for pausing.
   
   Yes, that's was the primary goal for CAMEL-17051. I think this is a common 
problem for other components too even if they don't have native pause support 
like the Kafka client does. 
   I also think that native pause support may be important in the future once 
we start exploring partitioning support (granted: this is just a speculation 
ATM, but I supose it will be helpful) 
   
   > 
   > 
   > Camel has suspend/resume operations on a route (can call via Java or JMX) 
so users can force a pauses/resume. I think the camel kafka consumer should 
then implement Suspendable and then the doSuspend/doResume operations should 
then trigger the kafka-client pauses/resume methods.
   
   So, I think I should explore extending this API to support that.
   
   
   > 
   >     2. automatic
   >        The generic way with a "boolean" seems a bit more more like a 
readiness check that would break out the poll loop, which you can then 
"configure" or "customize" to make it automatic. I wonder if the 
BooleanSupplier API is a bit too simplistic? You may need access to the Camel 
Consumer so you have a way to use information from there to know if you can 
continue or not.
   
   I think you raise a good point here. I will take a closer look at whether 
the BooleanSupplier can be enough or whether I can come up with a more flexible 
design for this part of the API.
   
   Thanks for the review!
   
   


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

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to