Quarkus
Quarkus Integration
Section titled “Quarkus Integration”A Quarkus extension that integrates Atmosphere with Quarkus 3.21+. Provides build-time annotation scanning via Jandex, Arc CDI integration, and GraalVM native image support.
Maven Coordinates
Section titled “Maven Coordinates”<dependency> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-quarkus-extension</artifactId> <version>LATEST</version> <!-- check Maven Central for latest --></dependency>The deployment artifact (atmosphere-quarkus-extension-deployment) is resolved automatically by Quarkus.
Quick Start
Section titled “Quick Start”application.properties
Section titled “application.properties”quarkus.atmosphere.packages=com.example.chatChat.java
Section titled “Chat.java”@ManagedService(path = "/atmosphere/chat")public class Chat {
@Inject private BroadcasterFactory factory;
@Inject private AtmosphereResource r;
@Ready public void onReady() { }
@Disconnect public void onDisconnect() { }
@Message(encoders = {JacksonEncoder.class}, decoders = {JacksonDecoder.class}) public Message onMessage(Message message) { return message; }}The extension auto-registers the Atmosphere servlet — no web.xml or manual servlet registration needed. The same @ManagedService handler works across WAR, Spring Boot, and Quarkus — only packaging and configuration differ.
Configuration Properties
Section titled “Configuration Properties”All properties are under the quarkus.atmosphere.* prefix:
| Property | Default | Description |
|---|---|---|
quarkus.atmosphere.packages | (none) | Comma-separated packages to scan |
quarkus.atmosphere.servlet-path | /atmosphere/* | Servlet URL mapping |
quarkus.atmosphere.session-support | false | Enable HTTP session support |
quarkus.atmosphere.broadcaster-class | (default) | Custom Broadcaster implementation |
quarkus.atmosphere.broadcaster-cache-class | (default) | Custom BroadcasterCache implementation |
quarkus.atmosphere.load-on-startup | 1 | Servlet load-on-startup order — must be > 0 |
quarkus.atmosphere.heartbeat-interval-in-seconds | (default) | Heartbeat interval |
quarkus.atmosphere.init-params | (none) | Map of raw ApplicationConfig init params |
Note:
load-on-startupmust be > 0. Quarkus skips servlet initialization when this value is <= 0, unlike the standard Servlet spec where >= 0 means “load on startup.”
Running
Section titled “Running”mvn quarkus:dev # dev mode with live reloadmvn clean package && java -jar target/quarkus-app/quarkus-run.jar # JVMmvn clean package -Pnative # native imageGraalVM Native Image
Section titled “GraalVM Native Image”./mvnw -Pnative package -pl samples/quarkus-chat./samples/quarkus-chat/target/atmosphere-quarkus-chat-*-runnerRequires GraalVM JDK 21+ or Mandrel. Use -Dquarkus.native.container-build=true to build without a local GraalVM installation.
Samples
Section titled “Samples”- Quarkus Chat — real-time chat with WebSocket and long-polling fallback