-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a composite loader to inject Quarkus properties into the driver configuration #75
Comments
How are system properties overrides handled in such a composition:
It seems that Quarkus config will have precedence over system properties. |
@olim7 I see a couple of drawbacks:
(this is happening on this code: regarding this: if they want to customize low-level options via the native driver config, it has to be an application.conf file in the classpath, it's not possible to use other built-in loader (e.g. DriverConfigLoader.fromUrl), or a custom loader. I think that this behavior could be achieved a little bit simpler, by allowing clients to override this method with a custom logic:
The wdyt? |
Due to JAVA-2887: apache/cassandra-java-driver#1505. We will have to wait for driver 4.10 to be able to switch to composite profiles. |
Currently the extension uses the programmatic config loader to inject the options coming from the Quarkus config (
CassandraClientConfig
andCassandraClientConnectionConfig
).The problem is that this doesn't allow users to bring their own config loader: if they want to customize low-level options via the native driver config, it has to be an
application.conf
file in the classpath, it's not possible to use other built-in loader (e.g.DriverConfigLoader.fromUrl
), or a custom loader.Driver 4.7.0 introduces
DriverConfigLoader.compose()
to solve this:@nonnull
@deprecated
protected DriverConfigLoader defaultConfigLoader() {
return overrideWithQuarkusConfig(super.defaultConfigLoader());
}
@nonnull
protected DriverConfigLoader defaultConfigLoader(@nullable ClassLoader classLoader) {
return overrideWithQuarkusConfig(super.defaultConfigLoader(classLoader));
}
The text was updated successfully, but these errors were encountered: