Is springboot-websocket production ready?

Viewed 207

I am implementing a STOMP endpoint in Java with Spring Boot, here's my dependency & code:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.4.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>
...
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

Java config:

@Configuration
@EnableWebSocketMessageBroker
public class WebsocketConfig implements WebSocketMessageBrokerConfigurer {

    @Value("${wschannel.name}")
    private String wsChannel;

    @Value("${topic.prefix}")
    private String topic;

    @Override
    public void registerStompEndpoints(StompEndpointRegistry registry) {
         registry.addEndpoint("/"+wsChannel).setAllowedOrigins("*");
         registry.addEndpoint("/"+wsChannel).setAllowedOrigins("*").withSockJS();
    }

    @Override
    public void configureMessageBroker(MessageBrokerRegistry config) {
        config.enableSimpleBroker(topic+"/");
    }
}

It works, but I can't understand the following:

  1. What kind of websocket server is spring boot bringing up?
  2. Is it production ready?
  3. I also have access to a redis cluster: could I use that as websocket broker?
0 Answers
Related