Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Unknown
Description
In a Spring Cloud environment some components might create a child application context that spring cloud mantains. Such is the case for Feign and Ribbon Clients.
See 7.2 - https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html
"A central concept in Spring Cloud’s Feign support is that of the named client. Each feign client is part of an ensemble of components that work together to contact a remote server on demand, and the ensemble has a name that you give it as an application developer using the @FeignClient annotation. Spring Cloud creates a new ensemble as an ApplicationContext on demand for each named client using FeignClientsConfiguration."
This child application contexts are going to be an ApplicationEvent source for the SpringCamelContext and RoutesCollector component who are defined as ApplicationEvent listeners in a parent context.
SpringCamelContext is intended to be started after a ContextRefreshedEvent.
RoutesCollector intends to add routes to the camel context after a ContextRefreshedEvent.
When there are child application contexts (ContextRefreshedEvent emitters) we end up having some inconsistencies in the camel context lifecycle.
To reproduce the issue see:
https://github.com/oalles/camel-cloud-bug
Pull Request:
https://github.com/apache/camel/pull/2581
Attachments
Issue Links
- links to