You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/10/27 09:02:09 UTC

[GitHub] [camel] orpiske opened a new pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

orpiske opened a new pull request #6346:
URL: https://github.com/apache/camel/pull/6346


   This adds some reusable classes/methods so that we can consolidate common do-test-wait-and-retry logic. 
   
   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->


-- 
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-unsubscribe@camel.apache.org

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



[GitHub] [camel] orpiske commented on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-952699258


   @davsclaus @oscerd what do you think about this approach? This is just the beginning, so there's more code being brought in (and tests too) ... but I think we can potentially clean up a bit of the retry logic in the components.  


-- 
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-unsubscribe@camel.apache.org

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



[GitHub] [camel] orpiske edited a comment on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske edited a comment on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-954601074


   I adjusted the code to use Camel's Executor Service Manager. Unfortunately I had to convert some of the background tasks to foreground ones because our own service manager uses a custom scheduled executor (`SizedScheduledExecutorService`) with a go/no-go behavior for scheduling the tasks. These components are not prepared to handle this (and also the added dependency on having the context available). 
   
   For the future, I'll think of a way to adjust our executor service manager to accommodate a service executor for tasks, but doing this first step w/ foreground tasks should help 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.

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

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



[GitHub] [camel] orpiske commented on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-954601074


   I adjusted the code to use Camel's Executor Service Manager. Unfortunately I had to convert some of the background tasks to foreground ones because our own service manager uses a scheduled executor (`SizedScheduledExecutorService`) with a go/no-go behavior for scheduling the tasks and these components are not prepared to handle this (and also the added dependency on having the context available). 
   
   For the future, I'll think of a way to adjust our executor service manager to accommodate a service executor for tasks, but doing this first step w/ foreground tasks should help 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.

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

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



[GitHub] [camel] orpiske edited a comment on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske edited a comment on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-954601074


   I adjusted the code to use Camel's Executor Service Manager. Unfortunately I had to convert some of the background tasks to foreground ones because our own service manager uses a custom scheduled executor (`SizedScheduledExecutorService`) with a go/no-go behavior for scheduling the tasks and these components are not prepared to handle this (and also the added dependency on having the context available). 
   
   For the future, I'll think of a way to adjust our executor service manager to accommodate a service executor for tasks, but doing this first step w/ foreground tasks should help 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.

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

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



[GitHub] [camel] orpiske commented on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-953238100


   > Good work, this is great idea.
   > 
   > One issue is that the scheduled thread pool is created directly from the JDK. We should use Camel's ExecutorServiceManager for this, as all threads should be created via this in the same way. This manager also have APIs for shutting down the thread pool if no longer needed.
   
   Thanks Claus! Tomorrow I'll adjust it and retest the code using Camel's ExecutorServiceManager.  


-- 
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-unsubscribe@camel.apache.org

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



[GitHub] [camel] orpiske commented on pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #6346:
URL: https://github.com/apache/camel/pull/6346#issuecomment-953577595


   Oops. I forgot today is a holiday :partying_face: I will take a look tomorrow :keyboard: 


-- 
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-unsubscribe@camel.apache.org

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



[GitHub] [camel] orpiske merged pull request #6346: (RFC) CAMEL-17121: create a wrapper for repeatable tasks

Posted by GitBox <gi...@apache.org>.
orpiske merged pull request #6346:
URL: https://github.com/apache/camel/pull/6346


   


-- 
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-unsubscribe@camel.apache.org

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