org.springframework.web.socket.config.annotation

## Interface WebSocketMessageBrokerConfigurer

- All Known Implementing Classes:
    AbstractWebSocketMessageBrokerConfigurer

      public interface WebSocketMessageBrokerConfigurer

  Defines methods for configuring message handling with simple messaging protocols (e.g. STOMP) from WebSocket clients. Typically used to customize the configuration provided via `@EnableWebSocketMessageBroker`.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configureClientInboundChannel(ChannelRegistration registration)` Configure the `MessageChannel` used for incoming messages from WebSocket clients.
    `void` | `configureClientOutboundChannel(ChannelRegistration registration)` Configure the `MessageChannel` used for incoming messages from WebSocket clients.
    `void` | `configureMessageBroker(MessageBrokerRegistry registry)` Configure message broker options.
    `boolean` | `configureMessageConverters(List<MessageConverter> messageConverters)` Configure the message converters to use when extracting the payload of messages in annotated methods and when sending messages (e.g.
    `void` | `configureWebSocketTransport(WebSocketTransportRegistration registry)` Configure options related to the processing of messages received from and sent to WebSocket clients.
    `void` | `registerStompEndpoints(StompEndpointRegistry registry)` Register STOMP endpoints mapping each to a specific URL and (optionally) enabling and configuring SockJS fallback options.

- - ### Method Detail

    - #### registerStompEndpoints

          void registerStompEndpoints(StompEndpointRegistry registry)

      Register STOMP endpoints mapping each to a specific URL and (optionally) enabling and configuring SockJS fallback options.

    - #### configureWebSocketTransport

          void configureWebSocketTransport(WebSocketTransportRegistration registry)

      Configure options related to the processing of messages received from and sent to WebSocket clients.

    - #### configureClientInboundChannel

          void configureClientInboundChannel(ChannelRegistration registration)

      Configure the `MessageChannel` used for incoming messages from WebSocket clients. By default the channel is backed by a thread pool of size 1. It is recommended to customize thread pool settings for production use.

    - #### configureClientOutboundChannel

          void configureClientOutboundChannel(ChannelRegistration registration)

      Configure the `MessageChannel` used for incoming messages from WebSocket clients. By default the channel is backed by a thread pool of size 1. It is recommended to customize thread pool settings for production use.

    - #### configureMessageConverters

          boolean configureMessageConverters(List<MessageConverter> messageConverters)

      Configure the message converters to use when extracting the payload of messages in annotated methods and when sending messages (e.g. through the "broker" SimpMessagingTemplate).

      The provided list, initially empty, can be used to add message converters while the boolean return value is used to determine if default message should be added as well.

      Parameters:
        `messageConverters` - initially an empty list of converters
      Returns:
        whether to also add default converter or not

    - #### configureMessageBroker

          void configureMessageBroker(MessageBrokerRegistry registry)

      Configure message broker options.