Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: camel-kafka
-
Labels:None
-
Estimated Complexity:Unknown
Description
If we set configuration for Kafka endpoint as reference, the actual resulting configuration for endpoint is not merged and some query param-set properties are lost. It's easier to use shared configuration in cases us having global bean with zookeeper configuration and broker list.
@UriParam
private KafkaConfiguration configuration = new KafkaConfiguration();
...
@Override
protected KafkaEndpoint createEndpoint(String uri,
String remaining,
Map<String, Object> params) throws Exception {
KafkaEndpoint endpoint = new KafkaEndpoint(uri, this);
String brokers = remaining.split("\\?")[0];
if (brokers != null) {
endpoint.getConfiguration().setBrokers(brokers);
}
setProperties(endpoint, params);
return endpoint;
}