def connect!(repository)
      repository.subscribe do |aggregate_id, event|
        route(event.name, aggregate_id, **event.data)
      end
    end
def connect!(repository)
      repository.subscribe do |aggregate_id, event|
        route(event.name, aggregate_id, **event.data)
      end
    end
Connects to the repository.