Skip to content

Example with multiple intercommunicating aggregates? #216

Description

@tocklime

It would be useful to see an example of how to embed a CqrsFramework inside a services or query object. I might have an aggregate which needs to query other aggregates (or issue commands to other aggregates) in the handle function. Or I might have a query which needs to issue commands to some CqrsFramework when it sees certain events.

However, I need to pass the complete queries vec and services object to the CqrsFramework::new function, so it's not quite clear to me how to embed the framework inside the queries and services.

I do have a mostly working example using Arc::new_cyclic, but I'm not sure I like it.

Is new_cyclic ok? am I doing Things That Should Not Be Done?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions