Skip to content

stolbovd/DomainEventsSamples

Repository files navigation

DomainEventsSamples

Exchange between bounded context with domain events

Steps to run this example:

  1. Install libraries

    mvn clean install
  2. Run RabbitMQ

    docker-compose up -d
  3. Run configuration-service

  4. Run both services DomainEventsPersons and DomainEventsSchool

    • ToDo: add to docker scripts

  5. Create group TEACHER in service DomainEventsPersons

    http post :8084/rest/api/groups role=TEACHER
    • ToDo: Domain events published on repository.save(aggregateRoot) just when aggregate is not new?

  6. Create person in service DomainEventsPersons

    http post :8084/rest/api/persons fullName:='{"family": "Ivanova", "name": "Irina", "secName": "Victorovna"}' user:='{"username": "IvanovaIV"}'
  7. Get id from reply and assign person to role TEACHER

    http post :8084/rest/persons/<id>/assignToRole/TEACHER
  8. Check whether the teacher should be created in DomainEventsSchool service

    http :8085/rest/api/teachers

About

Exchange between bounded context with domain events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages