Open anchialas opened 1 month ago
How can the selector be configured “correctly”?
You could get a handle on the master component within a CDI observer and use setServiceSelector
to pass in your custom selector. See example here:
https://camel.apache.org/camel-quarkus/next/user-guide/configuration.html#_cdi
Bug description
We have multiple Camel-Master Service Providers active in our Quarkus camel app with
Therefore we would like to replace the default SelectSingle selector [1] with the
SelectByOrder
implementation. For this we use the propertycamel.component.master.service-selector
. Since an instance is expected as the value, we have also written a simple converter:This all works, but the auto-configuration mechanism [2] takes effect too late: the master component has already been initialized with the default selector [3].
How can the selector be configured “correctly”?
Thank you! # [1] org.apache.camel.support.cluster.ClusterServiceSelectors#DEFAULT_SELECTOR [2] MainHelper.setPropertiesOnTarget:323 [3] MainHelper.setPropertiesOnTarget:303