Search code examples
quarkussmallrye

What is the difference between setting profile in quarkus with smallrye.config.profile or quarkus.profile


In quarkus the config is stored inside an application.properties file. You can have multiple application-{profile}.properties files. {profile} is the name of the profile you want it to be.

When started with java -jar <pathToJar> -Dquarkus.profile=PROFILE_ONE the file application-PROFILEONE.properties is used. During startup of the app you can read that quarkus is using the PROFILE_ONE profile.

When started with java -jar <pathToJar> -Dsmallrye.config.profile=PROFILE_ONE the file application-PROFILEONE.properties is used. During startup of the app you can read that quarkus is using the PROD profile.

What exactly is the difference between both? Is it better to use smallrye.config.profile so that quarkus is still using the PROD profile? Is the PROD profile faster?

Thanks!


Solution

  • That is actually a bug. Internally, both use the same profile, but the log is reporting a different one when you use smallrye.config.profile, because it is only checking for quarkus.profile and then it defaults to prod (later in the code the actual profile is checked and used the correct one).

    The message needs to be fixed. I'll look into it.