Class: AceMQ::AMQP::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/acemq/amqp/connection.rb

Overview

A delivery that has been read.

envelope.attempt is the count for this delivery, worked out by the consumer; everything else in the envelope came off the wire. body is there for a handler that wants the bytes the codec was given, which is what anybody debugging a decoding disagreement between two languages actually needs. reply_to is AMQP's own property, read off the delivery rather than out of the headers, and it is what a request published by the Java or .NET library carries. Patterns.serve reads the acemq-reply-to header first and falls back to this.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#body ⇒ Object

Returns the value of attribute body

Returns:

  • (Object) —

    the current value of body



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def body
  @body
end

#content_type ⇒ Object

Returns the value of attribute content_type

Returns:

  • (Object) —

    the current value of content_type



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def content_type
  @content_type
end

#envelope ⇒ Object

Returns the value of attribute envelope

Returns:

  • (Object) —

    the current value of envelope



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def envelope
  @envelope
end

#payload ⇒ Object

Returns the value of attribute payload

Returns:

  • (Object) —

    the current value of payload



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def payload
  @payload
end

#redelivered ⇒ Object

Returns the value of attribute redelivered

Returns:

  • (Object) —

    the current value of redelivered



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def redelivered
  @redelivered
end

#reply_to ⇒ Object

Returns the value of attribute reply_to

Returns:

  • (Object) —

    the current value of reply_to



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def reply_to
  @reply_to
end

#routing_key ⇒ Object

Returns the value of attribute routing_key

Returns:

  • (Object) —

    the current value of routing_key



44
45
46
# File 'lib/acemq/amqp/connection.rb', line 44

def routing_key
  @routing_key
end

Instance Method Details

#attempt ⇒ Object



50
# File 'lib/acemq/amqp/connection.rb', line 50

def attempt = envelope.attempt

#id ⇒ Object



49
# File 'lib/acemq/amqp/connection.rb', line 49

def id = envelope.id

#redelivered? ⇒ Boolean

Returns:

  • (Boolean)


48
# File 'lib/acemq/amqp/connection.rb', line 48

def redelivered? = !!redelivered