Skip to content

mrook/axon-projection-rebuild-demo

Repository files navigation

Rebuilding projections with Axon Framework

This is a simple app to demonstrate how to rebuild projections (read models) in Axon Framework (4.0).

The app has a very simple domain: Persons can be registered (through a controller), and there is a single projection which can be rebuilt. The status / progress of rebuilds can be tracked.

Rebuilding is done using the Tracking Event Processor component. For more information see the following web pages:

This is a proof of concept and probably needs significant cleanup. It could also stop working with future Axon updates.

Prerequisities

  • Docker
  • Docker Compose
  • JDK 8+

To run

Execute the following commands:

$ docker-compose up -d
$ gradle bRu

Then, in a separate terminal, run:

$ curl http://localhost:8080/hello?name=Foo
$ curl http://localhost:8080/rebuild-status

You should see something like:

{"org.demo.projections.PersonProjections/1":{"0":{"segment":{"segmentId":0,"mask":0},"caughtUp":true,"trackingToken":{"index":1,"gaps":[]}}}}

About

Rebuild projections in Axon Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages