class Akasha::EventRouter

Routes events synchronously, providing consistency. Useful for routing to materializers, providing read-your-writes guarantee.

Public Instance Methods

connect!(repository) click to toggle source

Connects to the repository.

# File lib/akasha/event_router.rb, line 9
def connect!(repository)
  repository.subscribe do |aggregate_id, event|
    route(event.name, aggregate_id, **event.data)
  end
end