You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2022/02/08 17:22:00 UTC
[jira] [Updated] (CAMEL-17618) camel-ref: only add the endpoint into camelContext when not exist
[ https://issues.apache.org/jira/browse/CAMEL-17618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Yue Fang updated CAMEL-17618:
-------------------------------------
Fix Version/s: 3.16.0
Affects Version/s: 3.15.0
> camel-ref: only add the endpoint into camelContext when not exist
> -----------------------------------------------------------------
>
> Key: CAMEL-17618
> URL: https://issues.apache.org/jira/browse/CAMEL-17618
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.15.0
> Reporter: Freeman Yue Fang
> Assignee: Freeman Yue Fang
> Priority: Major
> Fix For: 3.16.0
>
>
> Currently camel-ref endpoint always adds the underlying endpoint like
> getCamelContext().addEndpoint(getEndpoint().getEndpointUri(), endpoint);
> We should check if it exists or not firstly like
> if (getCamelContext().getEndpoint(getEndpoint().getEndpointUri()) == null) {
> getCamelContext().addEndpoint(getEndpoint().getEndpointUri(), endpoint);
> }
> Because if we re-add the same endpoint, this endpoint actually will be stopped
--
This message was sent by Atlassian Jira
(v8.20.1#820001)