class Shamu::Events::Message

The event {Message} consists of a set of well-defined attributes describing a single discrete event in the system and associated meta-data needed by subscribers to process the message.

Messages should attempt to forward the state available at the time the event was published so that subscribers can process the message without contacting additional services.

Event messages are serialized for network or IPC transimission and must limit attributes to primitive types (Strings, Numbers, Arrays and Hashes) so they can be round tripped with `Message.new( message.to_attributes )`.

Public Class Methods

new( * ) click to toggle source

@!endgroup Attributes

Calls superclass method Shamu::Attributes::new
# File lib/shamu/events/message.rb, line 31
def initialize( * )
  super

  @id ||= SecureRandom.uuid
end