Decouple services with publish and subscribe
When a project changes state, the service that owns the project publishes one event to a channel. Each interested service subscribes to that channel on its own, so the publishing code contains no list of the services that consume the event.
Impact
The sample publishes one project.shared event when Marcellin Dubois shares a project with the Foldgate Studios design team. Relay accepts one event per idempotency key, so a retried publish call from your code puts one event on the channel.
Prompt for a coding agent: Publish one project.shared event each time a user shares a project, even when the call retries.
Select a file to view its contents