Parent

AMQP::Header

Message metadata (aka envelope).

Attributes

channel[R]

@api public @return [AMQP::Channel]

method[R]

AMQP method frame this header is associated with. Carries additional information that varies between AMQP methods.

@api public @return [AMQ::Protocol::Method]

attributes[R]

AMQP message attributes @return [Hash]

Public Class Methods

new(channel, method, attributes) click to toggle source

@api public

    # File lib/amqp/header.rb, line 27
27:     def initialize(channel, method, attributes)
28:       @channel, @method, @attributes = channel, method, attributes
29:     end

Public Instance Methods

ack(multiple = false) click to toggle source

Acknowledges the receipt of this message with the server. @param [Boolean] multiple Whether or not to acknowledge multiple messages @api public

    # File lib/amqp/header.rb, line 34
34:     def ack(multiple = false)
35:       @channel.acknowledge(@method.delivery_tag, multiple)
36:     end
consumer_tag() click to toggle source
    # File lib/amqp/header.rb, line 55
55:     def consumer_tag
56:       @method.consumer_tag
57:     end
content_type() click to toggle source
    # File lib/amqp/header.rb, line 84
84:     def content_type
85:       @attributes[:content_type]
86:     end
correlation_id() click to toggle source
     # File lib/amqp/header.rb, line 104
104:     def correlation_id
105:       @attributes[:correlation_id]
106:     end
delivery_mode() click to toggle source
    # File lib/amqp/header.rb, line 80
80:     def delivery_mode
81:       @attributes[:delivery_mode]
82:     end
delivery_tag() click to toggle source
    # File lib/amqp/header.rb, line 51
51:     def delivery_tag
52:       @method.delivery_tag
53:     end
exchange() click to toggle source
    # File lib/amqp/header.rb, line 67
67:     def exchange
68:       @method.exchange
69:     end
header() click to toggle source

@deprecated

    # File lib/amqp/header.rb, line 72
72:     def header
73:       @attributes
74:     end
headers() click to toggle source
    # File lib/amqp/header.rb, line 76
76:     def headers
77:       @attributes[:headers]
78:     end
message_id() click to toggle source
     # File lib/amqp/header.rb, line 108
108:     def message_id
109:       @attributes[:message_id]
110:     end
method_missing(meth, *args, &blk) click to toggle source

Returns AMQP message attributes. @api public

     # File lib/amqp/header.rb, line 115
115:     def method_missing(meth, *args, &blk)
116:       if @attributes && args.empty? && blk.nil? && @attributes.has_key?(meth)
117:         @attributes[meth]
118:       else
119:         @method.__send__(meth, *args, &blk)
120:       end
121:     end
priority() click to toggle source
    # File lib/amqp/header.rb, line 96
96:     def priority
97:       @attributes[:priority]
98:     end
redelivered() click to toggle source
    # File lib/amqp/header.rb, line 59
59:     def redelivered
60:       @method.redelivered
61:     end
redelivered?() click to toggle source
    # File lib/amqp/header.rb, line 63
63:     def redelivered?
64:       @method.redelivered
65:     end
reject(opts = {}) click to toggle source

Reject this message. @option opts [Hash] :requeue (false) Whether message should be requeued. @api public

    # File lib/amqp/header.rb, line 41
41:     def reject(opts = {})
42:       @channel.reject(@method.delivery_tag, opts.fetch(:requeue, false))
43:     end
reply_to() click to toggle source
     # File lib/amqp/header.rb, line 100
100:     def reply_to
101:       @attributes[:reply_to]
102:     end
timestamp() click to toggle source
    # File lib/amqp/header.rb, line 88
88:     def timestamp
89:       @attributes[:timestamp]
90:     end
to_hash() click to toggle source

@return [Hash] AMQP message header w/o method-specific information. @api public

    # File lib/amqp/header.rb, line 47
47:     def to_hash
48:       @attributes
49:     end
type() click to toggle source
    # File lib/amqp/header.rb, line 92
92:     def type
93:       @attributes[:type]
94:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.