class MessageDriver::Message::Base
Attributes
body[R]
ctx[R]
destination[R]
headers[R]
properties[R]
raw_body[R]
Public Class Methods
new(ctx, destination, body, headers, properties, raw_body = nil)
click to toggle source
# File lib/message_driver/message.rb, line 8 def initialize(ctx, destination, body, headers, properties, raw_body = nil) @ctx = ctx @destination = destination @body = body @headers = headers @properties = properties @raw_body = raw_body.nil? ? body : raw_body end
Public Instance Methods
ack(options = {})
click to toggle source
# File lib/message_driver/message.rb, line 17 def ack(options = {}) if ctx.supports_client_acks? ctx.ack_message(self, options) else logger.debug('this adapter does not support client acks') end end
nack(options = {})
click to toggle source
# File lib/message_driver/message.rb, line 25 def nack(options = {}) if ctx.supports_client_acks? ctx.nack_message(self, options) else logger.debug('this adapter does not support client acks') end end