For Artemis ActiveMQ, durable subscriptions in STOMP are implemented by adding the header "durable-subscription-name" in the SUBSCRIBE and UNSUBSCRIBE frames. Using current Spring it is possible to add the header when subscribing, but once the subscription is created there does not seem to be any way to unsubscribe from the durable subscription (other than manually constructing the necessary STOMP frame). To add this feature, the org.springframework.messaging.simp.stomp.DefaultStompSession.DefaultSubscription class would need to be extended to track the durable subscription name so that it could be passed back in the UNSUBSCRIBE frame when unsubscribe() is called.
Since the header name string (for example "durable-subscription-name" used by ActiveMQ-Artemis) is not a standard value this would need to be specified when the original subscription is made.
We can update StompSession.Subscription to expose the headers used for SUBSCRIBE as well as to provide an additional unsubscribe that accepts StompHeaders so you can then easily manage this. Does that make sense to you?