Class: AceMQ::AMQP::Patterns::OutboxRecord

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

Overview

A message that has been decided but not yet published.

body is bytes rather than an object, and that is the important part: a record outlives the process that wrote it, and the class it was encoded from may not survive the deployment that happens while it is waiting.

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



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def body
  @body
end

#content_type ⇒ Object

Returns the value of attribute content_type

Returns:

  • (Object) —

    the current value of content_type



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def content_type
  @content_type
end

#created_at ⇒ Object

Returns the value of attribute created_at

Returns:

  • (Object) —

    the current value of created_at



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def created_at
  @created_at
end

#exchange ⇒ Object

Returns the value of attribute exchange

Returns:

  • (Object) —

    the current value of exchange



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def exchange
  @exchange
end

#headers ⇒ Object

Returns the value of attribute headers

Returns:

  • (Object) —

    the current value of headers



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def headers
  @headers
end

#id ⇒ Object

Returns the value of attribute id

Returns:

  • (Object) —

    the current value of id



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def id
  @id
end

#routing_key ⇒ Object

Returns the value of attribute routing_key

Returns:

  • (Object) —

    the current value of routing_key



40
41
42
# File 'lib/acemq/amqp/patterns/outbox.rb', line 40

def routing_key
  @routing_key
end

Instance Method Details

#to_s ⇒ Object



44
# File 'lib/acemq/amqp/patterns/outbox.rb', line 44

def to_s = "#{id} -> #{exchange.empty? ? "(default)" : exchange}/#{routing_key}"