Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

quarkus.http.enable-compression in src/main/resources/application.properties ignored since 2.9.0.Final?

Tags:

quarkus

I have quarkus.http.enable-compression=true in my src/main/resources/application.properties file, and with Quarkus 2.8.3.Final it works as expected. i.e. HTTP requests with an Accept-Encoding: gzip header receive a gzip'd response body.

But when I update to Quarkus 2.9.0.Final (or later) quarkus.http.enable-compression=true seems to be ignored, and HTTP response bodies are no longer gzip'd.

I see from the Migration Guide 2.9 that "HTTP compression settings have been made build time configuration so they cannot be overridden at runtime anymore." But my understanding is that application.properties can hold both build time and runtime configuration.

I also tried taking the setting out of application.properties and instead:

quarkus:dev -Dquarkus.http.enable-compression=true

That works on 2.8.3.Final, but not on 2.9.0.Final.

What am I missing?

like image 740
Paul Mossman Avatar asked Oct 20 '25 03:10

Paul Mossman


1 Answers

yes, the migration guide is incomplete. Previously, all HTTP responses were compressed if the config property quarkus.http.enable-compression was set to true. Since 2.9 the response body is compressed if quarkus.http.enable-compression=true AND:

  1. A JAX-RS resource method or a reactive route is annotated with @io.quarkus.vertx.http.Compressed, or
  2. The Content-Type header is set and the value is a compressed media type as configured via quarkus.http.compress-media-types.

See also:

  • https://quarkus.io/guides/resteasy-reactive#http-compression
  • https://quarkus.io/guides/reactive-routes#http-compression
  • https://quarkus.io/guides/http-reference#http-compression
like image 95
Martin Kouba Avatar answered Oct 22 '25 04:10

Martin Kouba