Skip to content

Configuration

Configuring the StompClient

The StompClient can be configured at construction time using a convenient lambda block:

val stompClient = StompClient(WebSocketClient.builtIn()) {
    connectionTimeout = 3.seconds
    gracefulDisconnect = false
}

You can also create the configuration separately and then pass it when constructing the client:

val stompConfig = StompConfig().apply {
    connectionTimeout = 3.seconds
    gracefulDisconnect = false
}

val stompClient = StompClient(WebSocketClient.builtIn(), stompConfig)

Configuration options

You can find out about all configuration properties in the StompConfig KDoc.