evoq_listener behaviour (evoq v1.14.1)
View SourceListener behaviour for evoq.
Listeners receive integration facts from external transports (pg or mesh) and dispatch commands to the local aggregate. They are the entry point for cross-domain integration.
Listeners get their own slice directory in the target CMD app, like process managers. This gives filesystem-level discoverability of external integration points.
Naming convention: on_{fact}_from_{transport}_{command}
Required Callbacks
- source_fact() -> binary() - transport() -> pg | mesh - handle_fact(FactType, Payload, Metadata) -> ok | skip | {error, Reason}