Skip to content

thabach/atmosphere-reactive-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atmosphere Reactive

Super simple reactive microservice framework : No Spring, No Akka ... just Netty!

@On("/dispatch")
public class MessageDispatcherService implements Service<Enveloppe> {
    private final Logger logger = LoggerFactory.getLogger(MessageDispatcherService.class);

    @Inject
    private ReactiveWebSocketFactory webSocketFactory;

    @Inject
    private EventBus eventBus;
    
    @Inject
    private Mapper mapper;

    @Override
    public void on(Enveloppe enveloppe, Reply<Enveloppe> reply) throws IOException {
        Message message = mapper.readValue(enveloppe.body(), Message.class);
        message.setText("Hello Simplicity");
        eventBus.dispatch("/ChatService", message);
        
        reply.ok(enveloppe);
    }
}

About

Reactive Microservices Framework using Atmosphere

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published