forward

suspend fun forward(model: AggregateModel<*>, command: Command<*>, wait: WaitContext?): Settlement

Executes command, derived on the way of a wait (by a saga, or later sent from another context), or sent by a timer, on model's aggregate with the wait context it inherited, and signals its results to the waiting node: ACCEPTED when the context waits for it, then COMMITTED or the failure, then the later hop it reached at once. Without a context, or past its deadline, it only executes.

It is routed as an admitted command is (router): to the owner of its partition, degrading to this node, so the owner's state cache sees every commit of its partitions. A saga's subscription runs on the owner of the partition of the entry it handles, which is not the derived command's partition in general.

Returns the Settlement: its Settlement.outcome is the kernel's when this node executed it.