Skip to content

Instantly share code, notes, and snippets.

@Papipo
Created July 13, 2014 21:10
Show Gist options
  • Save Papipo/fd65a511b1f297c26b03 to your computer and use it in GitHub Desktop.
Save Papipo/fd65a511b1f297c26b03 to your computer and use it in GitHub Desktop.
def on_message(message)
when Aggregate::Message
instance_of(message.aggregate, message.id).message(message.message, envelope.ivar)
Behaviour::MESSAGE_PROCESSED
end
end
def on_message(message)
when Aggregate::Message
redirect instance_of(message.aggregate, message.id), Concurrent::Actor::Envelope.new(message.message, envelope.ivar, Concurrent::Actor.current, self.reference)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment