Skip to content

Make StompSession.Subscription.unsubscribe() to return Receiptable #22729

@xak2000

Description

@xak2000

When I use WebSocketStompClient, then StompSession.subscribe method returns Subscription which extends Receiptable. The StompSession.send is also returns Receiptable.

This allows to call Receiptable.getReceiptId(), Receiptable.addReceiptTask(Runnable runnable) and Receiptable.addReceiptLostTask(Runnable runnable). These methods is useful to for example do send only when subscription is already created by broker (and not just called on client side).

But StompSession.Subscription.unsubscribe() method returns void. It also doesn't send receipt STOMP header even when StompSession.setAutoReceipt(true).

This prevents to check if unsubscription is already done on broker side (by waiting RECEIPT frame after UNSUBSCRIBE was sent).

It would be useful if StompSession.Subscription.unsubscribe() and StompSession.Subscription.unsubscribe(StompHeaders headers) will return Receiptable instead of void. It can also use StompSession.autoReceipt flag to automatically add a receipt header, as other methods do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions