Module: Stomper::Extensions::Common::V1_1
- Defined in:
- lib/stomper/extensions/common.rb
Overview
Stomp Protocol 1.1 extensions to the common interface.
Instance Method Summary collapse
-
#ack(message_or_id, *args) ⇒ Stomper::Frame
Acknowledge that a MESSAGE frame has been received and successfully processed.
-
#nack(message_or_id, *args) ⇒ Stomper::Frame
Inform the broker that a MESSAGE frame was not processed.
Instance Method Details
#ack(message, headers = {}) ⇒ Stomper::Frame #ack(message, subscription_id, headers = {}) ⇒ Stomper::Frame #ack(message_id, subscription_id, headers = {}) ⇒ Stomper::Frame
Acknowledge that a MESSAGE frame has been received and successfully processed. The Stomp 1.1 protocol now requires that both ID of the message and the ID of the subscription the message arrived on must be specified in the ACK frame’s headers.
197 198 199 |
# File 'lib/stomper/extensions/common.rb', line 197 def ack(, *args) transmit create_ack_or_nack('ACK', , args) end |
#nack(message, headers = {}) ⇒ Stomper::Frame #nack(message, subscription_id, headers = {}) ⇒ Stomper::Frame #nack(message_id, subscription_id, headers = {}) ⇒ Stomper::Frame
Inform the broker that a MESSAGE frame was not processed. A NACK frame is, in effect, the opposite of an ACK frame. The NACK command is a new feature introduced in Stomp 1.1, hence why it is unavailable to Stomp 1.0 connections.
229 230 231 |
# File 'lib/stomper/extensions/common.rb', line 229 def nack(, *args) transmit create_ack_or_nack('NACK', , args) end |