pub fn dispatch_event(
conn: &Connection,
event: &str,
memory_id: &str,
namespace: &str,
agent_id: Option<&str>,
db_path: &Path,
)Expand description
Fire an event to all matching subscribers. Each dispatch runs in
its own OS thread and does NOT block the caller. Errors are logged
and counted in the DB via failure_count.
Caller owns the connection. Dispatch threads re-open the connection
as needed to update counters (cheap — SQLite connections are
process-shared via WAL).