class BunnyMock::MessageProperties
Public Class Methods
@private
# File lib/bunny_mock/message_properties.rb, line 15 def initialize(properties) properties.delete :exchange @properties = properties end
Public Instance Methods
Access properties by key @see Hash#[]
# File lib/bunny_mock/message_properties.rb, line 28 def [](key) @properties[key] end
@return [String] Publishing application, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 104 def app_id @properties[:app_id] end
@return [String] Cluster ID, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 109 def cluster_id @properties[:cluster_id] end
@return [String] (Optional) content encoding of the message, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 49 def content_encoding @properties[:content_encoding] end
@return [String] (Optional) content type of the message, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 44 def content_type @properties[:content_type] end
@return [String] What message this message is a reply to (or corresponds to), as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 69 def correlation_id @properties[:correlation_id] end
@return [Integer] Delivery mode (persistent or transient)
# File lib/bunny_mock/message_properties.rb, line 59 def delivery_mode @properties[:delivery_mode] end
Iterate over the properties @see Enumerable#each
# File lib/bunny_mock/message_properties.rb, line 22 def each(*args, &block) @properties.each(*args, &block) end
@return [String] Message expiration, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 79 def expiration @properties[:expiration] end
@return [String] Message headers
# File lib/bunny_mock/message_properties.rb, line 54 def headers @properties[:headers] end
@return [String] Message ID, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 84 def message_id @properties[:message_id] end
@return [Integer] Message priority, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 64 def priority @properties[:priority] end
@return [String] (Optional) How to reply to the publisher (usually a reply queue name)
# File lib/bunny_mock/message_properties.rb, line 74 def reply_to @properties[:reply_to] end
@return [Time] Message timestamp, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 89 def timestamp @properties[:timestamp] end
@return [Hash] Hash of message properties
# File lib/bunny_mock/message_properties.rb, line 33 def to_hash @properties end
@return [String] String representation of message properties
# File lib/bunny_mock/message_properties.rb, line 38 def to_s to_hash.to_s end
@return [String] Message type, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 94 def type @properties[:type] end
@return [String] Publishing user, as set by the publisher
# File lib/bunny_mock/message_properties.rb, line 99 def user_id @properties[:user_id] end