evoq_event_router (evoq v1.12.0)

View Source

Routes events to handlers by event type.

Receives events from reckon-db subscriptions and routes them to interested handlers based on event type.

Key features: - Per-event-type routing (not per-stream) - Event upcasting before delivery - Parallel delivery to multiple handlers - Telemetry for observability

Summary

Functions

Route an event to interested handlers.

Route an event with options.

Route multiple events to interested handlers.

Start the event router.

Functions

route_event(Event, Metadata)

-spec route_event(map(), map()) -> ok.

Route an event to interested handlers.

route_event(Event, Metadata, Opts)

-spec route_event(map(), map(), map()) -> ok.

Route an event with options.

route_events(Events, Metadata)

-spec route_events([map()], map()) -> ok.

Route multiple events to interested handlers.

start_link()

-spec start_link() -> {ok, pid()} | {error, term()}.

Start the event router.