code: @Override
      public void unsetMessageRouter(MessageRouter msgRouter) {
          externalMessageRouter.compareAndSet(msgRouter, null);
  
          if (msgRouter instanceof WsMessageRouter) {
              unsetWsMessageRouter((WsMessageRouter) msgRouter);
          }
      }
docs: Un-inject.