matchFunc returns true. It is stateless.
Docker image
fonoster/routr-dispatcher
The image reads its configuration from /etc/routr/dispatcher.yaml (CONFIG_PATH).
Ports
Configuration file
The Dispatcher reads a YAML or JSON file and validates it against a JSON schema at startup.matchFunc receives the JSON form of the MessageRequest protobuf (sipmessage.proto). These are typical match functions:
Environment variables
gRPC contract
The Dispatcher serves the same contract as a Processor, so the EdgePort can talk to either. It is also a client of that contract toward each Processor and middleware.
See processor.proto.
Minimal example
This configuration sends every message to the Connect processor.Notes
- You need a Dispatcher only with more than one Processor or at least one middleware. Otherwise, point the EdgePort at the Processor directly.
- Order matters. The first Processor whose
matchFuncreturnstruegets the message, so put catch-all functions last. - Set
postProcessoron every middleware. A middleware without it runs in neither phase. - The schema does not enforce the fields inside
spec.processors[*], so a Processor entry withoutmatchFuncormethodsis not rejected at startup. Check each entry yourself.