Skip to content

ARCCHR0037: Read model stream is not on the command route

Use this diagnostic when a per-stream model cannot select the command’s stream. Fix the route rather than falling back to a whole-source read.

Error, in Off, Measure and On. A Handle() or Provide() parameter, or a CommandValidator<T> constructor parameter, takes a model declaring Chronicle’s [EventStream<TSource>(stream)], but the command’s source/stream differs or it declares no explicit stream id. [LookUpBy] on the parameter also reports this rule: a stream model belongs to the command’s own event source.

ProblemResolution
No route, a different definition or stream, or AllRoute the command with [EventSource<TSource>(stream)] matching the model
No stream id, or the default idAdd [EventStreamId("{Month}")], another explicit id, or ICanProvideEventStreamId
A lookup selects another sourceRemove [LookUpBy]. Use the IDecisionReads stream overload in Provide() for another source or month

Matching source/stream string attributes are accepted by value; a typed definition keeps writers aligned. The monthly-limit example shows the complete route and validator. Runtime mismatches produce ReadModelStreamNotOnCommandRoute before reading. Missing template values instead return 400 naming the property.

The rule checks declarations, not the value returned by a provider or the template’s input. Runtime route validation remains authoritative. Keyed services and handler values potentially supplied by Provide() are excluded. There is no code fix.