dvine created CAMEL-22627:
-----------------------------
Summary: Camel fails gracefully shutdown with wiretap/kamelet
Key: CAMEL-22627
URL: https://issues.apache.org/jira/browse/CAMEL-22627
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 4.15.0
Reporter: dvine
We have long running tasks and set a large grace period during termination to
clear these. What we see is errors like:
org.apache.camel.component.kamelet.KameletConsumerNotAvailableException: No
consumers available on endpoint: kamelet://<removed>?<removed>
The code around this is called from a wiretap:
.wireTap( kamelet://<removed>?<removed>") like so. If I replace it with .toD
then we do not see the issue.
During normal operation the logs show:
[d #45 - WireTap] o.a.c.i.e.AbstractCamelContext :
kamelet://<redacted> converted to endpoint: kamelet://<redacted> by component:
org.apache.camel.component.kamelet.KameletComponent@320aecd3
[d #45 - WireTap] o.a.c.s.s.BaseService$Holder : Starting service:
kamelet://<redacted>
[d #45 - WireTap] o.a.c.s.s.BaseService$Holder : Started service:
kamelet://<redacted>
[d #45 - WireTap] o.a.c.s.c.ServicePool : Creating service
from endpoint: kamelet://<redacted>
If camel is shutting down then it forgoese any starting service calls:
[d #46 - WireTap] o.a.c.i.e.AbstractCamelContext :
kamelet://<redacted> converted to endpoint: kamelet://<redacted> by component:
org.apache.camel.component.kamelet.KameletComponent@3d1cb317
[d #46 - WireTap] o.a.c.s.c.ServicePool : Creating service
from endpoint: kamelet://<redacted>
And then leads later to the KameletConsumerNotAvailableException.
Which makes sense because the code around the starting only starts if camel is
started and running from what I can see. However this means we cannot
gracefully complete shutdown.
I entered this as a bug because it seems to be a problem with wiretap/kamelets
more specifically but advice regarding a work around for this would be
appreciated. I havent managed to repeat this with non kamelets.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)