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.

Problem Resolution
No route, a different definition or stream, or All Route the command with [EventSource<TSource>(stream)] matching the model
No stream id, or the default id Add [EventStreamId("{Month}")], another explicit id, or ICanProvideEventStreamId
A lookup selects another source Remove [LookUpBy]. Use the IDecisionReads stream overload directly in Handle() for another source or month, with a reasoned ARCCHR0040 suppression linked to the tracking feature

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.