Is there any possible way to configure a quarkus native image after building it?

122 views Asked by At

I am currently working on a Kafka-Application with Quarkus. My question is now, if there is any possible way to configure the parameters in the "application.properties" file after building with "mvn package -Pnative" so you dont need maven, java and docker installed on every machine where you want to change the properties.

I personally am not sure if this can really work because of the AOT compilation of GraalVM.

I tried editing the properties file and restarting the application afterwards which obviously didnt work, but it was worth a try. Looking forward to your answers.

Cheers

1

There are 1 answers

0
geoand On

Quarkus configuration properties come in two different variaties:

  • Build Time configuration - this occurs when the application is build (in this case with mvn package)
  • Runtime configuration - this occurs when the application is launched

Build time configuration cannot be changed at runtime because they are essentially baked into the application at build time.

The way to know which configuration options are build time and which are runtime is by going to the all-config page and seeing whether or not the property you are interested in has a lock icon or not (lock means it's build time and therefore cannot be changed at runtime).

You can read more here.