Hello,
Our project is related to vehicle logistics and distribution of vehicle into network.
So, we basically collect events of a vehicle journey that are produced in plant and ready to be picked up by logistics parties to deliver to the dealer)
and this happens with multiple stops and multiple carriers.
Now, let’s say that, in a vehicle journey from point A to point B, we know that we have N amount of events that should happen.
After, we are posting commands to our aggregate to write planned events and have a saga to schedule a deadline for each actual event expected.
When a third party logistic provider actually moves the vehicle and sends the events then, we cancel the deadline.
Given this scenario, I have a couple of questions on deadline manager usage and event naming convention.
- Does it makes sense to write a planned event that is yet to happen on so and so date into Eventstore? – VehicleGateReleasePlannedEvent
- Now, lets say, there is a event called VehicleGateReleasePlannedEvent and we have a deadline in a minute for the actual event called GateReleasedEvent .
If this event doesn’t happen then how can I make my deadlinehandler to extend the current deadline?
Here is my current approach:
a) Have the saga deadline handler send a command to aggregate and dump an event to the Eventstore called GateReleaseDelayed.
b) Again, have saga handler to react to the GateReleaseDelayedEvent and create one more deadline with the same the same pay load as the first one,
so the same deadline handler will be invoked and the cycle repeats until actual event happens.
c) On actual event happening cancel All deadlines by deadline name.
FYI - We are using axon server and framework version 4.1.2 with spring boot and in memory H2 DB configuration. Most of our code base is pretty default configuration.