Sha256: ac41a2a29fb0d5476eaba673608db4177565700ea55741b089e487a2038a296c

Contents?: true

Size: 432 Bytes

Versions: 5

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

module AMQP
  Message = Struct.new(:channel, :delivery_tag, :exchange_name, :routing_key, :properties, :body, :redelivered, :consumer_tag) do
    def ack
      channel.basic_ack(delivery_tag)
    end

    def reject(requeue: false)
      channel.basic_reject(delivery_tag, requeue)
    end
  end

  ReturnMessage = Struct.new(:reply_code, :reply_text, :exchange, :routing_key, :properties, :body)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amqp-client-0.3.0 lib/amqp/client/message.rb
amqp-client-0.2.3 lib/amqp/client/message.rb
amqp-client-0.2.2 lib/amqp/client/message.rb
amqp-client-0.2.1 lib/amqp/client/message.rb
amqp-client-0.2.0 lib/amqp/client/message.rb