Skip to content
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

Support generic JDBC properties #5513

Closed
jsenko opened this issue Nov 13, 2024 · 4 comments · Fixed by #5488
Closed

Support generic JDBC properties #5513

jsenko opened this issue Nov 13, 2024 · 4 comments · Fixed by #5488

Comments

@jsenko
Copy link
Member

jsenko commented Nov 13, 2024

We have a set of explicit properties for JDBC here https://github.com/Apicurio/apicurio-registry/blob/main/app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryDatasourceProducer.java#L62 .

Instead of adding properties one-by-one in the future, we should consider a more general approach to configure JDBC, similar to what we do for Kafka here https://github.com/Apicurio/apicurio-registry/blob/main/app/src/main/java/io/apicurio/registry/storage/impl/kafkasql/KafkaSqlFactory.java#L85 .

Related to #5507

@carlesarnal
Copy link
Member

We've introduced this kind of support due to the Quarkus inability to deactivate a particular datasource. That has been addressed in Quarkus, so we must go back and use the standard Quarkus properties (keeping the Registry specific ones we've already defined for compatibiltiy). That gives us back the flexibility for the jdbc configuration.

@jsenko
Copy link
Member Author

jsenko commented Nov 13, 2024

So the changes in the linked PR are not necessary? I see the property quarkus.datasource.jdbc.max-lifetime is available.

@carlesarnal
Copy link
Member

So the changes in the linked PR are not necessary? I see the property quarkus.datasource.jdbc.max-lifetime is available.

It's very possible, I'm trying to finish the Quarkus upgrade and that was going to be my next thing, but we must avoid adding any new properties that already exist in Quarkus.

@carlesarnal
Copy link
Member

This is now possible on main and will be possible in 3.0.4. Four datasources have been defined, one per each db schema type. In order to configure additional values, the Quarkus standard way can be used. For example, for configuring the maximum lifetime for the mysql datasource, the environment variable QUARKUS_DATASOURCE_MYSQL_JDBC_MAX_LIFETIME. Same goes for postgresq, mssql, or h2, the same pattern applies.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Registry 3.0 Nov 14, 2024
@carlesarnal carlesarnal self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants