https://github.com/atmosphere/atmosph4rx
Atmosphere Framework version 4 for Reactive Streams
https://github.com/atmosphere/atmosph4rx
reactive-programming reactive-streams spring-boot websockets
Last synced: 10 months ago
JSON representation
Atmosphere Framework version 4 for Reactive Streams
- Host: GitHub
- URL: https://github.com/atmosphere/atmosph4rx
- Owner: Atmosphere
- License: apache-2.0
- Created: 2018-04-20T22:08:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-06-27T16:06:26.000Z (about 1 year ago)
- Last Synced: 2025-08-20T14:49:11.934Z (11 months ago)
- Topics: reactive-programming, reactive-streams, spring-boot, websockets
- Language: Java
- Homepage: http://async-io.org
- Size: 286 KB
- Stars: 34
- Watchers: 16
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Welcome to the Atmosph4rX Framework!
## The WebSocket Reactive Streams Framework for Java
[SpringBoot 2](https://projects.spring.io/spring-boot/) + [Project Reactor](https://projectreactor.io/) + [Atmosphere](https://github.com/Atmosphere/atmosphere) = **Atmosph4rX**.
[Reactive Streams](http://www.reactive-streams.org/) made easy!
Atmosph4rX is a complete rewrite of the [Atmosphere Framework](https://github.com/Atmosphere/atmosphere). All the functionalities are or will be ported to Atmosph4rX.
## ROADMAP
* Work in Progress. See [ROADMAP](./ROADMAP.md) for more details.
## As simple as
### Reactive Streams Subscriber
```java
@ReactTo("/mySubscriber")
public final class MySubscriber implements AxSubscriber {
@Topic("/message")
private SocketsGroupProcessor processor;
@Override
public void onSubscribe(AxSubscription s) {
processor.subscribe(s.socket());
}
@Override
public void onNext(String next) {
// Push data to all {@link Subscriber}s.
// toProcessor return a FluxProcessor
processor.toProcessor().onNext(next);
}
@Override
public void onComplete() {
}
@Override
public void onError(Throwable throwable) {
}
}
```
### Annotation based
```java
@ReactTo("/foo")
public final class MyPoJo {
@Topic("/message")
private SocketsGroupProcessor processor;
@Open
public void open() {
}
@Close
public void close() {
}
@Message
public void on(String message) {
processor.publish(next);
}
@Error
public void error() {
}
}
```
## How to install
```xml
org.atmosphere
atmosph4rx
4.0.0-SNAPSHOT
```