vertx / io.vertx.rxjava.ext.stomp / StompClientConnection / unsubscribe

# unsubscribe

`open fun unsubscribe(destination: String): StompClientConnection`

Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the `id` header).

### Parameters

`destination` - the destination

Return
the current io.vertx.rxjava.ext.stomp.StompClientConnection

`open fun unsubscribe(destination: String, receiptHandler: Handler<Frame>): StompClientConnection`

Un-subscribes from the given destination. This method only works if the subscription did not specifies a subscription id (using the `id` header).

### Parameters

`destination` - the destination

`receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the un-subscription has been received. The handler receives the sent frame (`UNSUBSCRIBE`).

Return
the current io.vertx.rxjava.ext.stomp.StompClientConnection

`open fun unsubscribe(destination: String, headers: MutableMap<String, String>): StompClientConnection`

Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains the `id` header, the header value is used. Otherwise the destination is used.

### Parameters

`destination` - the destination

`headers` - the headers

Return
the current io.vertx.rxjava.ext.stomp.StompClientConnection

`open fun unsubscribe(destination: String, headers: MutableMap<String, String>, receiptHandler: Handler<Frame>): StompClientConnection`

Un-subscribes from the given destination. This method computes the subscription id as follows. If the given headers contains the `id` header, the header value is used. Otherwise the destination is used.

### Parameters

`destination` - the destination

`headers` - the headers

`receiptHandler` - the handler invoked when the `RECEIPT` frame associated with the un-subscription has been received. The handler receives the sent frame (`UNSUBSCRIBE`).

Return
the current io.vertx.rxjava.ext.stomp.StompClientConnection