Sha256: 1ac30b4f3c680b03f8995fb7569ac6ade4a7bc106e539276fca55860ed9da7fd

Contents?: true

Size: 750 Bytes

Versions: 41

Compression:

Stored size: 750 Bytes

Contents

class MQ
  class Header
    include AMQP

    def initialize(mq, header_obj)
      @mq = mq
      @header = header_obj
    end

    # Acknowledges the receipt of this message with the server.
    def ack
      @mq.callback{
        @mq.send Protocol::Basic::Ack.new(:delivery_tag => properties[:delivery_tag])
      }
    end

    # Reject this message (XXX currently unimplemented in rabbitmq)
    # * :requeue => true | false (default false)
    def reject opts = {}
      @mq.callback{
        @mq.send Protocol::Basic::Reject.new(opts.merge(:delivery_tag => properties[:delivery_tag]))
      }
    end

    def method_missing meth, *args, &blk
      @header.send meth, *args, &blk
    end

    def inspect
      @header.inspect
    end
  end
end

Version data entries

41 entries across 41 versions & 9 rubygems

Version Path
right_amqp-0.8.7 lib/right_amqp/mq/header.rb
right_amqp-0.8.6 lib/right_amqp/mq/header.rb
right_amqp-0.8.5 lib/right_amqp/mq/header.rb
adamh-amqp-0.6.3.1 lib/mq/header.rb
brontes3d-amqp-0.6.4.0 lib/mq/header.rb
brontes3d-amqp-0.6.4.1 lib/mq/header.rb
brontes3d-amqp-0.6.4.2 lib/mq/header.rb
brontes3d-amqp-0.6.4.3 lib/mq/header.rb
brontes3d-amqp-0.6.4 lib/mq/header.rb
fotonauts-amqp-0.6.1 lib/mq/header.rb
fotonauts-amqp-0.6.4 lib/mq/header.rb
tmm1-amqp-0.6.0 lib/mq/header.rb
tmm1-amqp-0.6.1 lib/mq/header.rb
tmm1-amqp-0.6.3 lib/mq/header.rb
tmm1-amqp-0.6.4 lib/mq/header.rb
right_amqp-0.8.4 lib/right_amqp/mq/header.rb
right_amqp-0.8.3 lib/right_amqp/mq/header.rb
right_amqp-0.7.0 lib/right_amqp/mq/header.rb
right_amqp-0.6.1 lib/right_amqp/mq/header.rb
right_amqp-0.6.0 lib/right_amqp/mq/header.rb