Example usage for org.springframework.messaging.simp.stomp StompHeaderAccessor setReceipt

List of usage examples for org.springframework.messaging.simp.stomp StompHeaderAccessor setReceipt

Introduction

In this page you can find the example usage for org.springframework.messaging.simp.stomp StompHeaderAccessor setReceipt.

Prototype

public void setReceipt(@Nullable String receiptId) 

Source Link

Usage

From source file:com.codeveo.lago.bot.stomp.client.WebSocketStompSession.java

public void subscribe(String destination, String receiptId) {
    StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.SUBSCRIBE);
    headers.setSubscriptionId("sub-" + this.subscriptionIndex.getAndIncrement());
    headers.setDestination(destination);
    if (receiptId != null) {
        headers.setReceipt(receiptId);
    }/*w  w w  . j ava 2  s .c om*/
    sendInternal(MessageBuilder.withPayload(EMPTY_PAYLOAD).setHeaders(headers).build());
}

From source file:fr.jugorleans.poker.client.stomp.WebSocketStompSession.java

public void subscribe(String destination, String receiptId) {
    StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.SUBSCRIBE);
    headers.setSubscriptionId("sub" + this.subscriptionIndex.getAndIncrement());
    headers.setDestination(destination);
    if (receiptId != null) {
        headers.setReceipt(receiptId);
    }/*from w  w w .j  a v  a2  s .c om*/
    sendInternal(MessageBuilder.withPayload(EMPTY_PAYLOAD).setHeaders(headers).build());
}