or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/io.quarkus/quarkus-resteasy-reactive@3.15.x

docs

index.md
tile.json

tessl/maven-io-quarkus--quarkus-resteasy-reactive

tessl install tessl/maven-io-quarkus--quarkus-resteasy-reactive@3.15.0

A Jakarta REST implementation utilizing build time processing and Vert.x for high-performance REST endpoints with reactive capabilities in cloud-native environments.

configuration.mddocs/reference/

Configuration

Quarkus REST provides build-time and runtime configuration options for customizing REST behavior, buffering, multipart handling, and security.

Build-Time Configuration

Configure via application.properties with the quarkus.rest.* prefix. All these properties are evaluated at build time.

Buffer Sizes

# Input buffer size in bytes (default: 10240)
quarkus.rest.input-buffer-size=10240

# Minimum chunk size in bytes for writing (default: 128)
quarkus.rest.min-chunk-size=128

# Output buffer size in bytes (default: 8191)
quarkus.rest.output-buffer-size=8191

Content Negotiation

# Assume text/plain for single String returns (default: true)
quarkus.rest.single-default-produces=true

# Auto-detect application/json for collections and arrays (default: true)
quarkus.rest.default-produces=true

Endpoint Validation

# Fail build on duplicate endpoints (default: true)
quarkus.rest.fail-on-duplicate=true

# Respect build-time condition annotations like @EndpointDisabled (default: true)
quarkus.rest.build-time-condition-aware=true

# Pass control to next handler on 404 (default: false)
quarkus.rest.resume-on-404=false

Runtime Configuration

Multipart Configuration

# Default charset for multipart parts (default: UTF-8)
quarkus.rest.multipart.input-part.default-charset=UTF-8

REST Client Configuration

Configure REST Client behavior with the quarkus.rest-client.* prefix.

# Auto-register @Provider annotated classes (default: true)
quarkus.rest-client.provider-autodiscovery=true

# Disable smart produces (deprecated, default: false)
quarkus.rest-client.disable-smart-produces=false

Security Configuration

Configure JAX-RS security with the quarkus.security.jaxrs.* prefix.

Access Control

# Deny access to endpoints without security annotations (default: false)
quarkus.security.jaxrs.deny-unannotated-endpoints=false

# Default roles for all endpoints (comma-separated, default: none)
quarkus.security.jaxrs.default-roles-allowed=user,admin

Configuration Classes

ResteasyReactiveConfig

Build-time configuration class for RESTEasy Reactive.

public class ResteasyReactiveConfig {
    // Properties accessible via quarkus.rest.*

    int inputBufferSize;      // Input buffer size
    int minChunkSize;         // Minimum chunk size for writing
    int outputBufferSize;     // Output buffer size
    boolean singleDefaultProduces;  // Single String default produces
    boolean defaultProduces;        // Collections default produces
    boolean buildTimeConditionAware;  // Respect build-time condition annotations
    boolean failOnDuplicate;        // Fail on duplicate endpoints
    boolean resumeOn404;            // Resume on 404
}

RestClientReactiveConfig

Build-time configuration for REST Client.

public class RestClientReactiveConfig {
    // Properties accessible via quarkus.rest-client.*

    boolean disableSmartProduces;  // Deprecated: Disable smart produces
    boolean providerAutodiscovery;  // Auto-register @Provider classes
}

JaxRsSecurityConfig

Security configuration for JAX-RS endpoints.

public class JaxRsSecurityConfig {
    // Properties accessible via quarkus.security.jaxrs.*

    boolean denyUnannotatedEndpoints;  // Deny unannotated endpoints
    Optional<List<String>> defaultRolesAllowed;  // Default roles
}

Configuration Examples

Development Configuration

# application-dev.properties
quarkus.rest.input-buffer-size=10240
quarkus.rest.output-buffer-size=8191
quarkus.rest.fail-on-duplicate=true
quarkus.security.jaxrs.deny-unannotated-endpoints=false

Production Configuration

# application-prod.properties
quarkus.rest.input-buffer-size=16384
quarkus.rest.output-buffer-size=16384
quarkus.rest.fail-on-duplicate=true
quarkus.security.jaxrs.deny-unannotated-endpoints=true
quarkus.security.jaxrs.default-roles-allowed=user

High-Throughput Configuration

# Larger buffers for high-throughput scenarios
quarkus.rest.input-buffer-size=32768
quarkus.rest.output-buffer-size=32768

Secure Configuration

# Deny access to all endpoints without explicit security annotations
quarkus.security.jaxrs.deny-unannotated-endpoints=true

# Require user role by default
quarkus.security.jaxrs.default-roles-allowed=user

Programmatic Access

Access configuration programmatically:

import io.quarkus.resteasy.reactive.common.runtime.ResteasyReactiveConfig;
import jakarta.inject.Inject;

@ApplicationScoped
public class ConfigService {

    @Inject
    ResteasyReactiveConfig config;

    public void logConfig() {
        logger.info("Input buffer: {}", config.inputBufferSize);
        logger.info("Output buffer: {}", config.outputBufferSize);
    }
}

Profile-Specific Configuration

Use Quarkus profiles for environment-specific configuration:

# Default (all profiles)
quarkus.rest.input-buffer-size=10240

# Development profile
%dev.quarkus.rest.input-buffer-size=8192
%dev.quarkus.security.jaxrs.deny-unannotated-endpoints=false

# Test profile
%test.quarkus.rest.input-buffer-size=4096
%test.quarkus.security.jaxrs.deny-unannotated-endpoints=false

# Production profile
%prod.quarkus.rest.input-buffer-size=16384
%prod.quarkus.security.jaxrs.deny-unannotated-endpoints=true
%prod.quarkus.security.jaxrs.default-roles-allowed=user

Environment Variables

Override properties with environment variables:

# Override input buffer size
export QUARKUS_REST_INPUT_BUFFER_SIZE=16384

# Override security setting
export QUARKUS_SECURITY_JAXRS_DENY_UNANNOTATED_ENDPOINTS=true

System Properties

Override properties with system properties:

java -Dquarkus.rest.input-buffer-size=16384 \
     -Dquarkus.security.jaxrs.deny-unannotated-endpoints=true \
     -jar application.jar

Configuration Priority

Configuration sources in order of priority (highest to lowest):

  1. System properties (-D flags)
  2. Environment variables
  3. Profile-specific properties (%profile.)
  4. application.properties
  5. Default values

Best Practices

Buffer Sizing

  • Small payloads (<10KB): Use default buffer sizes
  • Large payloads (>100KB): Increase buffer sizes to 16-32KB
  • Streaming: Keep buffers moderate, rely on backpressure

Security

  • Public APIs: deny-unannotated-endpoints=false
  • Internal APIs: deny-unannotated-endpoints=true
  • Microservices: deny-unannotated-endpoints=true with explicit roles

Content Negotiation

  • JSON-heavy APIs: Keep default-produces=true
  • Mixed content: Set single-default-produces=false for explicit @Produces

Multipart

  • International users: Ensure default-charset=UTF-8
  • Legacy systems: May need ISO-8859-1 or other charsets

Validation

Duplicate Endpoint Detection

# Fail build if duplicate endpoints detected (recommended)
quarkus.rest.fail-on-duplicate=true

This prevents accidental duplicate endpoint registration:

@Path("/items")
public class ItemResource {

    @GET  // OK
    public List<Item> list() { }

    @GET  // BUILD ERROR: Duplicate endpoint
    public List<Item> listAll() { }
}

Resume on 404

# Pass to next handler on 404 (useful for fallback handlers)
quarkus.rest.resume-on-404=true

Allows multiple handlers to coexist:

@Path("/")
public class MainHandler {
    @GET
    @Path("/{path:.*}")
    public Response handleFallback(@RestPath String path) {
        // Catches all unmatched paths when resume-on-404=true
    }
}