Hi 
I saw this example at typesafe activator *akka-persistence-eventsourcing 
<https://github.com/ScalaConsultants/akka-persistence-eventsourcing> and it 
is really awesome ,but I have just a small question. *
*in the project demonstrated we have the *VehicleAggregate 
<https://github.com/ScalaConsultants/akka-persistence-eventsourcing/blob/master/src/main/scala/io/scalac/seed/domain/VehicleAggregate.scala>
 
and the userAggregate which are completely separated , but what if we had 
another aggregate, i.e DriverAggregate (the driver that handle the vehicle) 
which can accept command like : 
case class PaintYourCar(color:String) extends Command 
and should send command to the VehicleAggregate with the ChangeColor 
command .

*what is the best practice to do that ? *

should the DriverAggregate have a reference in it's constructor to the 
VehicleAggregate 
actorRef ? which means that the DriverAggregateManager should have 
something like 
{
...
val vehicleAggregateRef = VehicleAggregateManager 
<https://github.com/ScalaConsultants/akka-persistence-eventsourcing/blob/master/src/main/scala/io/scalac/seed/service/VehicleAggregateManager.scala>
.create(id) 
  override def aggregateProps(id: String) = DriverAggregate.props(id, 
vehicleAggregateRef)
...
}
but it doesn't feel very good .
Please advise 

Avi

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to