Atmosphere 4.0 — JDK 21+ Virtual Threads & Native Image

Atmosphere Real-time for the JVM

A battle-tested, enterprise-grade real-time framework for Java. Virtual Threads, WebSockets, SSE, and graceful fallbacks—with first-class Spring Boot 4, Quarkus 3, and Servlet starters. Built-in Rooms, Presence, AI/LLM streaming, Kotlin DSL, and Kafka/Redis clustering.

17+ Years in Production
3.7k GitHub Stars
Apache 2.0 License

First-class framework support

Zero-configuration starters for the frameworks you already use. Same @ManagedService API everywhere — your handlers are portable.

Spring Boot New in 4.0

4.0.2+

Auto-configured servlet, Spring DI bridge, and Actuator health indicator.

Maven atmosphere-spring-boot-starter
application.yml
atmosphere:
  packages: com.example.chat
View sample

Quarkus New in 4.0

3.21+

Build-time annotation scanning, Arc CDI, and WebSocket support.

Maven atmosphere-quarkus-extension
application.properties
quarkus.atmosphere.packages=\
  com.example.chat
View sample

Servlet Container

6.0+

Tomcat, Jetty, Undertow, GlassFish, Payara — any Servlet 6.0+ (Jakarta EE) container.

Maven atmosphere-runtime
View sample

Everything you need for real-time

A complete toolkit for building scalable, real-time applications on the JVM.

Virtual Threads

Every connection runs on a JDK 21 virtual thread. Massive scalability with no thread-pool tuning.

Click to explore →

WebSocket + Fallbacks

First-class WebSocket with automatic degradation to SSE and long-polling. Heartbeats and reconnection built in.

Click to explore →

Rooms & Presence

Built-in room management with presence tracking, message history, and authorization. No external dependencies.

Click to explore →

Simple Annotations

Define endpoints with @ManagedService or @RoomService. Handle lifecycle with @Ready, @Message, @Disconnect. Kotlin DSL available.

Click to explore →

Kafka & Redis Clustering

Scale across nodes with built-in Kafka and Redis broadcasters. Open source, no commercial add-ons required.

Click to explore →

AI & MCP Integration

Stream LLM tokens over WebSocket. MCP server for AI agents. Adapters for Spring AI, LangChain4j, and Embabel.

Click to explore →

Simple, powerful, familiar

Write real-time applications with clean, annotation-based Java on the server and intuitive JavaScript on the client.

Chat.java Server
import org.atmosphere.config.service.*;
import jakarta.inject.Inject;

@ManagedService(path = "/chat")
public class Chat {

    @Inject
    private AtmosphereResource r;

    @Ready
    public void onReady() {
        log.info("Connected: {}", r.uuid());
    }

    @Message(encoders = {JacksonEncoder.class},
            decoders = {JacksonDecoder.class})
    public Message onMessage(Message message) {
        return message; // broadcast to all
    }
}
client.js Client
import { atmosphere } from 'atmosphere.js';

const sub = await atmosphere.subscribe(
  {
    url: '/chat',
    transport: 'websocket',
    fallbackTransport: 'long-polling',
  },
  {
    open: (res) => console.log('Connected via', res.transport),
    message: (res) => console.log('Received:', res.responseBody),
  }
);

sub.push(JSON.stringify({ text: 'Hello!' }));

First-class framework hooks

Reactive bindings for React, Vue, and Svelte. One useAtmosphere call gives you connection state, incoming data, and a push function—no boilerplate.

React

Chat.tsx React
import { useAtmosphere } from 'atmosphere.js/react';

export default function Chat() {
  const { data, push, status } = useAtmosphere({
    url: '/chat',
    transport: 'websocket',
  });

  return (
    <div>
      <p>Status: {status}</p>
      <ul>{data.map(m => <li>{m}</li>)}</ul>
      <button onClick={() => push('Hello!')}>Send</button>
    </div>
  );
}

Vue

Chat.vue Vue
<script setup>
import { useAtmosphere } from 'atmosphere.js/vue';

const { data, push, status } = useAtmosphere({
  url: '/chat',
  transport: 'websocket',
});
</script>

<template>
  <p>Status: {{ status }}</p>
  <ul><li v-for="m in data">{{ m }}</li></ul>
  <button @click="push('Hello!')">Send</button>
</template>

Svelte

Chat.svelte Svelte
<script>
import { useAtmosphere } from 'atmosphere.js/svelte';

const { data, push, status } = useAtmosphere({
  url: '/chat',
  transport: 'websocket',
});
</script>

<p>Status: {$status}</p>
{#each $data as m}
  <li>{m}</li>
{/each}
<button on:click={() => push('Hello!')}>Send</button>

Built-in Clustering

Scale your real-time applications across multiple nodes with open-source Kafka and Redis broadcasters. Messages sent on any node are automatically delivered to clients connected to all other nodes.

  • Kafka — topic-per-broadcaster, virtual thread consumer, Apache Kafka 3.x
  • Redis — pub/sub channel-per-broadcaster, Lettuce 6.x, non-blocking
  • Automatic echo prevention — nodes never re-deliver their own messages
  • Compatible with Rooms, @ManagedService, and @RoomService
  • 100% open source — Apache 2.0 licensed, no commercial add-ons required
Clustering Docs
Kafka / Redis
Node 1
Node 2
Node 3
Node N

Support Subscriptions

Get support from the core team with fast response times. Meet your production schedule and compliance requirements.

Bronze

  • Coverage Business Hours
  • Response (S1) 7 Business Days
  • Response (S2) 10 Business Days
  • Incidents 2 / year
  • Phone Support
  • Email Support
  • Emergency Patches
Get a Quote

Silver

  • Coverage Business Hours
  • Response (S1) 1 Business Day
  • Response (S2) 2 Business Days
  • Incidents 10 / year
  • Phone Support
  • Email Support
  • Emergency Patches
Get a Quote

Gold

  • Coverage Business Hours
  • Response (S1) 4 hours
  • Response (S2) 1 Business Day
  • Incidents 15 / year
  • Phone Support
  • Email Support
  • Emergency Patches
Get a Quote

Platinum

  • Coverage 24x7
  • Response (S1) 1 hour
  • Response (S2) 4 hours
  • Incidents Unlimited
  • Phone Support
  • Email Support
  • Emergency Patches
Get a Quote