docs
reference
tessl install tessl/maven-io-quarkus--quarkus-resteasy-reactive@3.15.0A Jakarta REST implementation utilizing build time processing and Vert.x for high-performance REST endpoints with reactive capabilities in cloud-native environments.
Quarkus REST provides build-time and runtime configuration options for customizing REST behavior, buffering, multipart handling, and security.
Configure via application.properties with the quarkus.rest.* prefix. All these properties are evaluated at build time.
# 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# 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# 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# Default charset for multipart parts (default: UTF-8)
quarkus.rest.multipart.input-part.default-charset=UTF-8Configure 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=falseConfigure JAX-RS security with the quarkus.security.jaxrs.* prefix.
# 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,adminBuild-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
}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
}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
}# 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# 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# Larger buffers for high-throughput scenarios
quarkus.rest.input-buffer-size=32768
quarkus.rest.output-buffer-size=32768# 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=userAccess 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);
}
}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=userOverride 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=trueOverride properties with system properties:
java -Dquarkus.rest.input-buffer-size=16384 \
-Dquarkus.security.jaxrs.deny-unannotated-endpoints=true \
-jar application.jarConfiguration sources in order of priority (highest to lowest):
-D flags)%profile.)application.propertiesdeny-unannotated-endpoints=falsedeny-unannotated-endpoints=truedeny-unannotated-endpoints=true with explicit rolesdefault-produces=truesingle-default-produces=false for explicit @Producesdefault-charset=UTF-8ISO-8859-1 or other charsets# Fail build if duplicate endpoints detected (recommended)
quarkus.rest.fail-on-duplicate=trueThis 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() { }
}# Pass to next handler on 404 (useful for fallback handlers)
quarkus.rest.resume-on-404=trueAllows 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
}
}