Parent

Included Modules

Class/Module Index [+]

Quicksearch

Bunny::MessageProperties

Wraps basic properties hash as returned by amq-protocol to provide access to the delivery properties as immutable hash as well as methods.

Public Class Methods

new(properties) click to toggle source

@private

# File lib/bunny/message_properties.rb, line 18
def initialize(properties)
  @properties = properties
end

Public Instance Methods

[](k) click to toggle source

Accesses message properties by key @see Hash#[]

# File lib/bunny/message_properties.rb, line 30
def [](k)
  @properties[k]
end
app_id() click to toggle source

@return [String] Publishing application, as set by the publisher

# File lib/bunny/message_properties.rb, line 110
def app_id
  @properties[:app_id]
end
cluster_id() click to toggle source

@return [String] Cluster ID, as set by the publisher

# File lib/bunny/message_properties.rb, line 115
def cluster_id
  @properties[:cluster_id]
end
content_encoding() click to toggle source

@return [String] (Optional) content encoding of the message, as set by the publisher

# File lib/bunny/message_properties.rb, line 55
def content_encoding
  @properties[:content_encoding]
end
content_type() click to toggle source

@return [String] (Optional) content type of the message, as set by the publisher

# File lib/bunny/message_properties.rb, line 50
def content_type
  @properties[:content_type]
end
correlation_id() click to toggle source

@return [String] What message this message is a reply to (or corresponds to), as set by the publisher

# File lib/bunny/message_properties.rb, line 75
def correlation_id
  @properties[:correlation_id]
end
delivery_mode() click to toggle source

@return [Integer] Delivery mode (persistent or transient)

# File lib/bunny/message_properties.rb, line 65
def delivery_mode
  @properties[:delivery_mode]
end
each(*args, &block) click to toggle source

Iterates over the message properties @see Enumerable#each

# File lib/bunny/message_properties.rb, line 24
def each(*args, &block)
  @properties.each(*args, &block)
end
expiration() click to toggle source

@return [String] Message expiration, as set by the publisher

# File lib/bunny/message_properties.rb, line 85
def expiration
  @properties[:expiration]
end
headers() click to toggle source

@return [String] Message headers

# File lib/bunny/message_properties.rb, line 60
def headers
  @properties[:headers]
end
inspect() click to toggle source

@private

# File lib/bunny/message_properties.rb, line 45
def inspect
  to_hash.inspect
end
message_id() click to toggle source

@return [String] Message ID, as set by the publisher

# File lib/bunny/message_properties.rb, line 90
def message_id
  @properties[:message_id]
end
priority() click to toggle source

@return [Integer] Message priority, as set by the publisher

# File lib/bunny/message_properties.rb, line 70
def priority
  @properties[:priority]
end
reply_to() click to toggle source

@return [String] (Optional) How to reply to the publisher (usually a reply queue name)

# File lib/bunny/message_properties.rb, line 80
def reply_to
  @properties[:reply_to]
end
timestamp() click to toggle source

@return [Time] Message timestamp, as set by the publisher

# File lib/bunny/message_properties.rb, line 95
def timestamp
  @properties[:timestamp]
end
to_hash() click to toggle source

@return [Hash] Hash representation of this delivery info

# File lib/bunny/message_properties.rb, line 35
def to_hash
  @properties
end
to_s() click to toggle source

@private

# File lib/bunny/message_properties.rb, line 40
def to_s
  to_hash.to_s
end
type() click to toggle source

@return [String] Message type, as set by the publisher

# File lib/bunny/message_properties.rb, line 100
def type
  @properties[:type]
end
user_id() click to toggle source

@return [String] Publishing user, as set by the publisher

# File lib/bunny/message_properties.rb, line 105
def user_id
  @properties[:user_id]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.