Search code examples
springspring-websocketspring-messaging

Override ExecutorSubscribableChannel in Spring?


For the purpose of custom logic I'd need to override ExecutorSubscribableChannel in Spring (Websocket side). How I can possibly do that?


Solution

  • Not clear what are you going to override there, but extending AbstractWebSocketMessageBrokerConfigurer provides for you:

    @Override
    public void configureClientInboundChannel(ChannelRegistration registration) {
    }
    
    @Override
    public void configureClientOutboundChannel(ChannelRegistration registration) {
    }
    

    hooks and that ChannelRegistration lets you to specify any possible options on the ExecutorSubscribableChannel.