spring-framework / org.springframework.web.socket.messaging / WebSocketStompClient / setPhase

setPhase

open fun setPhase(phase: Int): Unit

Specify the phase in which the WebSocket client should be started and subsequently closed. The startup order proceeds from lowest to highest, and the shutdown order is the reverse of that.

By default this is Integer.MAX_VALUE meaning that the WebSocket client is started as late as possible and stopped as soon as possible.