Alexis Kinsella created CAMEL-5994:
--------------------------------------

             Summary: CamelJob implementation rely on some inconsistent 
endpoints LRU cache - Camel endpoints may not be called on quartz fire after 
some days of uptime
                 Key: CAMEL-5994
                 URL: https://issues.apache.org/jira/browse/CAMEL-5994
             Project: Camel
          Issue Type: Bug
          Components: camel-quartz
    Affects Versions: 2.10.3, 2.9.5
         Environment: Quartz is in deployed in cluster mode.
            Reporter: Alexis Kinsella
            Priority: Critical


CamelJobs rely on some endpoints LRU cache from camel context. If i'm not 
wrong, since LRU Cache relies on SoftReferences, Garbage Collector can decide 
to evict some entries and especially QuartzEndpoints.

It happens that sometimes endpoints evicted from LRU Caches are 
QuartzEndpoints. Since QuartzEnpoints are searched from CamelJob in LRU cache, 
they are not reachable anymore.

The side effect, is that CamelJob isntance initializes a new QuartzEndpoint, 
but loadbalancer is not initialized since it is initialized from QuartzConsumer.

The result is that quartz triggers jobs that instanciate Quartz endpoints with 
unintialized load balancers which are unable to call processor from the routes 
associated.

I have joined a fix that rely on the search of QuartzEndpoints from initalized 
routes of Camel context.

Fundamentally, the search of endpoints should not rely on endpoints LRU cache. 
It is a broken design.

Hope it helps.

By the way, there are other issues related to QuartzEndpoint load balancer 
initalization: If quartz starts before startup of Camel routes you will have 
the same issue: Correctly initialized QuartzEndpoints are not in LRU cache 
since Camel has not started routes (and so endpoints and consumers). Quartz 
will trigger job, and camel job will search for QuartzEndpoint and put it in 
LRUCache with uninitialized load balancer.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to