Skip to content

CHR0058: Self reducer method signature must match allowed signatures

A self-reducing read model folds events with public static methods named Reduce. Chronicle only accepts Reduce(event, current) or Reduce(event, current, EventContext), where current is the nullable read model type and the return type is the read model or Task of the read model. The rule reports a Reduce method that is declared on such a model, or is close to that shape, but does not match, so Chronicle would not use it.

Warning

Make the method public static, put the event first, the nullable current model second and an optional EventContext third, and return the read model or Task of the read model. Batch methods have their own rule, CHR0076.