For a lightweight library for Java WebSockets, the strongest matches are eclipse-vertx/vert.x (Vert), tootallnate/java-websocket (This is a pure Java library for implementing WebSocket) and apache/tomcat (Apache Tomcat is a full-featured Java web server that). netty/netty and spring-projects/spring-framework round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “best java websocket libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Vert.x is a reactive polyglot framework and asynchronous programming library for the Java Virtual Machine. It functions as an event-driven networking framework and toolkit for building non-blocking applications. The system enables the development of high-concurrency network services and event-driven microservices. It supports the creation of reactive services using multiple languages running on the JVM. The framework covers a wide range of capabilities including the management of HTTP and TCP network protocols, non-blocking file system access, and the integration of reactive clients.
Vert.x is a high-performance, asynchronous networking framework that provides robust, native support for WebSockets and full-duplex communication, making it a powerful choice for building scalable Java-based real-time services.
Java-WebSocket is a collection of classes for implementing WebSocket clients and servers using pure Java. It provides a framework for hosting servers that manage connections via event-driven subclasses and tools for establishing client connections to remote servers. The library includes a secure communication tool for encrypting traffic using the WSS protocol and a compression library that uses per-message deflate extensions to reduce transmitted data size. It supports the configuration of cipher suites to limit encryption protocols and ensure compatible communication. The project enables bi
This is a pure Java library for implementing WebSocket clients and servers that supports asynchronous I/O and event-driven communication, though it lacks native integration with the Spring Framework.
Apache Tomcat is an open-source implementation of the Jakarta Servlet, Pages, Expression Language, and WebSocket specifications, serving as a container for running Java web applications. It provides a modular architecture with a servlet container, connector abstraction for multiple I/O models, and a pipeline-based request processing system that handles cross-cutting concerns through composable components. The server supports container-managed security with configurable realms for authentication against JDBC, LDAP, or memory-based credential stores, and offers TLS encryption with optional Open
Apache Tomcat is a full-featured Java web server that provides a robust, specification-compliant implementation of the WebSocket protocol, making it a standard choice for handling real-time, full-duplex communication in Java applications.
Netty is an asynchronous network framework designed for building scalable protocol servers and clients. It utilizes an event-driven reactor pattern and a non-blocking input/output model to decouple connection handling from application logic, allowing for the development of responsive network services that manage high volumes of concurrent connections. The framework distinguishes itself through a modular pipeline-based processing chain that enables the implementation of custom binary or text-based protocols. It provides a pluggable transport abstraction that allows developers to switch between
Netty is a high-performance, asynchronous networking framework that provides the foundational non-blocking I/O and protocol-handling capabilities required to implement WebSocket servers and clients in Java.
Spring Framework is an enterprise Java framework providing a comprehensive infrastructure for building server-side applications. It functions as a dependency injection container and a Java application framework designed to support scalable backend development through modular architecture. The project provides tools for aspect-oriented programming to intercept method calls using dynamic proxies, allowing the application of cross-cutting concerns such as security and transactions. It also includes a centralized system for managing object lifecycles and coordinating component wiring by injecting
Spring Framework includes a robust, native WebSocket module that provides full-duplex communication, asynchronous I/O, and seamless integration with the rest of the Spring ecosystem.
Atmosphere is a Java-based framework for building and coordinating AI agents. It provides a real-time transport layer for streaming data via WebSockets, SSE, gRPC, and WebTransport, alongside a multi-agent orchestration framework for managing agent fleets through sequential, parallel, and graph-based execution workflows. The project features a durable workflow engine that persists agent state as snapshots, allowing long-running tasks to survive system restarts and incorporate human-in-the-loop approvals. It also implements Model Context Protocol servers to expose tools, resources, and prompt
Atmosphere provides a robust real-time transport layer for WebSockets and other protocols within the Java ecosystem, offering the asynchronous I/O and Spring integration required for full-duplex communication.
Undertow is a Java HTTP web server and non-blocking I/O server implementation. It functions as a Jakarta Servlet container and a WebSocket server, providing the infrastructure to execute standardized servlet components and maintain persistent full-duplex communication channels for real-time data exchange. The project is characterized by an asynchronous architecture that utilizes a non-blocking I/O model to handle large numbers of concurrent connections. It incorporates buffer-pooling mechanisms and zero-copy data transfers to reduce memory allocation and garbage collection pressure. The syst
Undertow is a high-performance, non-blocking Java web server that natively implements the WebSocket protocol, providing the asynchronous infrastructure required for full-duplex communication.
libwebsockets is an event-driven networking framework written in C. It provides a suite of tools for implementing HTTP servers and clients, WebSocket bidirectional communication, MQTT client messaging, and TLS-enabled socket encryption. The project distinguishes itself through a non-blocking event-loop architecture capable of scaling to high connection volumes by distributing network sessions across multiple service threads. It uses a protocol-based callback system and a pluggable event loop integration that allows the networking core to synchronize with external system event libraries. The
This is a high-performance C-based networking framework for WebSockets, but it does not provide the Java-based implementation or Spring Framework integration required for your project.
ZLMediaKit is a high-concurrency streaming engine designed to function as a protocol gateway and media server. It provides a native development kit for embedding streaming and transcoding capabilities directly into custom applications, supporting the ingestion, distribution, and recording of live video feeds across various network protocols. The platform distinguishes itself through a high-performance architecture that bridges legacy surveillance protocols with modern web-compatible streaming standards. It utilizes a thread-per-core execution model and zero-copy buffer management to maintain
This is a C++ media streaming server rather than a Java-based WebSocket library, and while it supports WebSocket as a transport for media, it does not provide the Java-native framework integration or general-purpose messaging capabilities requested.
libuv is a cross-platform asynchronous I/O library that provides an abstraction layer for event-driven networking, filesystem operations, and system signals. It utilizes a non-blocking event loop to coordinate asynchronous tasks and I/O events across different operating systems. The project features a unified interface for managing TCP, UDP, and DNS resolution, alongside an inter-process communication layer for sharing sockets via named pipes and Unix domain sockets. To prevent blocking the main execution loop, it includes a multi-platform thread pool for offloading computationally expensive
This is a low-level C library for asynchronous I/O and event-driven networking, which serves as a foundational building block rather than a Java-based WebSocket framework.
Coost is a concurrent network framework and coroutine scheduler designed for building high-performance TCP, HTTP, and RPC services. It provides a set of tools for handling non-blocking IPv4 and IPv6 communication, integrating SSL encryption and a lightweight execution engine that manages concurrent tasks using shared stacks. The project features a specialized JSON RPC implementation for exchanging structured data over encrypted connections and a high-performance logging system. This logging infrastructure supports topic-based routing, frequency filtering, and automated stack trace capture for
This is a C++ concurrent network framework for building TCP and RPC services, which does not provide the Java-based WebSocket implementation required for your project.
This project provides a comprehensive implementation of the WebSocket protocol, enabling persistent, bidirectional communication between clients and servers. It handles the low-level complexities of the protocol, including the initial HTTP upgrade handshake and the encapsulation of data into discrete binary frames. By managing these connections, it allows applications to exchange data instantly without the overhead associated with repeated standard request cycles. The library distinguishes itself through its focus on high-frequency message exchange and concurrent connection management. It uti
This is a Go-based library for WebSocket communication, which does not meet the requirement for a Java-based framework or integration with the Spring ecosystem.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| eclipse-vertx/vert.x | 14.7K | Java | NOASSERTION | |
| tootallnate/java-websocket | 10.8K | Java | MIT | |
| apache/tomcat | 8.2K | Java | Apache-2.0 | |
| netty/netty | 35K | Java | Apache-2.0 | |
| spring-projects/spring-framework | 60.1K | Java | Apache-2.0 | |
| atmosphere/atmosphere | 3.8K | Java | Apache-2.0 | |
| undertow-io/undertow | 3.7K | Java | Apache-2.0 | |
| warmcat/libwebsockets | 5.3K | C | NOASSERTION | |
| zlmediakit/zlmediakit | 17.2K | C++ | NOASSERTION | |
| libuv/libuv | 26.9K | C | MIT |