Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

Multiple guardians per aggregate? (Akka Persistence)

$
0
0

Hello!

We are using Akka Persistence (with CQRS) and we currently have one Aggregate in the system. We want to add another Aggregate, but I couldn’t find any documentation anywhere about this.

Should we create two guardians, one for Aggregate A and one for Aggregate B? Then our seed nodes would be something like:

    seed-nodes = [
      "akka://AggregateA@localhost:2551",
      "akka://AggregateB@localhost:2552"
    ]
  public static void main(String[] args) {
      ActorSystem.create(Guardian.create(), "AggregateA", config());
      ActorSystem.create(Guardian.create(), "AggregateB", config());
  }

Or is it better practice to have one guardian actor,, say “MasterAggregate” and then branch off AggregateA and AggregateB from that guardian actor?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles