Send an acknowledgement whether a message was consumed or not resulting in an ACK or NACK frame respectively. <p><strong>Note:</strong> to use this when subscribing you must set the {@link StompHeaders#setAck(string) ack} header to "client" or "client-individual" in order ot use this. @param messageId the id of the message @param consumed whether the message was consumed or not @return a Receiptable for tracking receipts @since 4.3
An overloaded version of {@link #acknowledge(string, )} with full {@link StompHeaders} instead of just a {@code messageId}. @param headers the headers for the ACK or NACK message frame @param consumed whether the message was consumed or not @return a Receiptable for tracking receipts @since 5.0.5
Disconnect the session by sending a DISCONNECT frame.
Return the id for the session.
Whether the session is connected.
Send a message to the specified destination, converting the payload to a {@code byte[]} with the help of a {@link hunt.stomp.converter.MessageConverter MessageConverter}. @param destination the destination to send a message to @param payload the message payload @return a Receiptable for tracking receipts
An overloaded version of {@link #send(string, Object)} with full {@link StompHeaders} instead of just a destination. The headers must contain a destination and may also have other headers such as "content-type" or custom headers for the broker to propagate to subscribers, or broker-specific, non-standard headers.. @param headers the message headers @param payload the message payload @return a Receiptable for tracking receipts
When enabled, a receipt header is automatically added to future {@code send} and {@code subscribe} operations on this session, which causes the server to return a RECEIPT. An application can then use the {@link StompSession.Receiptable Receiptable} returned from the operation to track the receipt. <p>A receipt header can also be added manually through the overloaded methods that accept {@code StompHeaders}.
Subscribe to the given destination by sending a SUBSCRIBE frame and handle received messages with the specified {@link StompFrameHandler}. @param destination the destination to subscribe to @param handler the handler for received messages @return a handle to use to unsubscribe and/or track receipts
An overloaded version of {@link #subscribe(string, StompFrameHandler)} with full {@link StompHeaders} instead of just a destination. @param headers the headers for the subscribe message frame @param handler the handler for received messages @return a handle to use to unsubscribe and/or track receipts
Represents a STOMP session with operations to send messages, create subscriptions and receive messages on those subscriptions.
@author Rossen Stoyanchev @since 4.2