macula_pubsub_delivery (macula v0.20.5)
View SourceMessage routing and delivery to local and remote subscribers. Combines local registry and remote discovery for full fan-out.
Summary
Functions
Deliver message to all matching local subscribers. Crashes if subscriber callback fails - indicates dead subscriber process.
Deliver message to remote subscribers via QUIC.
Get all unique patterns that match the topic. Used for remote subscriber discovery.
Publish message to both local and remote subscribers. Returns {LocalResults, RemoteResults}.
Types
Functions
-spec deliver_local(message(), macula_pubsub_registry:registry()) -> [delivery_result()].
Deliver message to all matching local subscribers. Crashes if subscriber callback fails - indicates dead subscriber process.
-spec deliver_remote(message(), [macula_pubsub_discovery:subscriber()], send_fun()) -> [delivery_result()].
Deliver message to remote subscribers via QUIC.
-spec get_matching_patterns(binary(), macula_pubsub_registry:registry()) -> [binary()].
Get all unique patterns that match the topic. Used for remote subscriber discovery.
-spec publish(message(), macula_pubsub_registry:registry(), discovery_fun(), send_fun()) -> {[delivery_result()], [delivery_result()]}.
Publish message to both local and remote subscribers. Returns {LocalResults, RemoteResults}.