Skip to content
N

Netty Websocket Spring Boot Starter

lightweight high-performance WebSocket framework ( 轻量级、高性能的WebSocket框架)

by YeautyYEFree

#352in Social
0In stores

Description

netty-websocket-spring-boot-starter is a Spring Boot starter for building WebSocket servers on Netty. It uses annotations similar to Spring'…

Highlights

  • Annotation-based WebSocket endpoints, similar to Spring WebSocket
  • Own Netty listener, on port 8081 by default
  • Lifecycle hooks for handshake, open, message, close and error
  • Requires JDK 17 or later, targets Spring Boot 4
  • Endpoint scanning outside the main package with @EnableWebSocket

Ratings & Reviews

No ratings yet

Be the first to rate Netty Websocket Spring Boot Starter.

People also visit

C

ChatApplication

Real-time, room-based chat app with WebSockets

Social
Launch
R

RPC Websockets

JSON-RPC 2.0 implementation over WebSockets for Node.js

Social
Launch
W

Websocketd

Turn any program into a WebSocket server

Developer Tools
Launch
W

websocket-engineer

Building real-time communication systems with WebSockets or Socket.IO

AI Skills
Get
S

SAEA

SAEA.Socket is a zero-copy, high-performance sockets network framework built…

Social
Launch
S

Springbootwebapp

Spring Boot Web Application

Utilities
Launch

Netty Websocket Spring Boot Starter FAQ

What does the starter do?

It lets you write WebSocket server endpoints in a Spring Boot application, using Netty as the transport and annotations for the event handlers.

Which Java and Spring versions are supported?

JDK 17 or later, with CI covering 17 and 21. The tested baseline is Spring Boot 4.1.1. Spring Boot 3 users should stay on version 0.13.x.

Why doesn't server.port change the WebSocket port?

The WebSocket server uses its own Netty listener. It defaults to 8081, and you change it with ws.port. The annotation's default of 80 is kept for compatibility.

How do I add endpoints in another package?

Add @EnableWebSocket(scanBasePackages = ...) to a configuration class and name the package that holds your endpoints.

Which events can I handle?

BeforeHandshake, OnOpen, OnMessage, OnClose and OnError. Each method can receive the session, HTTP headers or the throwable, depending on the event.

Can I add it to an existing web application?

Yes. The README says existing web applications can use it and that no extra component or manual exporter registration is needed.

Which Netty version does it use?

It defaults to Netty 4.2.18.Final. Boot's managed 4.2.17.Final is also tested. Validate other combinations before use.

What are the best Netty Websocket Spring Boot Starter alternatives?

Popular alternatives to Netty Websocket Spring Boot Starter include ChatApplication, RPC Websockets and SAEA. See all Netty Websocket Spring Boot Starter alternatives

Developer Stuff

Badges