via-on-sync
via or channel on a sync Relationship.
Severity: error · Since: v1.0.0
What check reports
Section titled “What check reports”For the failing example below, archidocs check prints:
shop/services.yaml:6:9 error via-on-sync `via` is only for an async Relationship; add `interaction: async` or remove `via`shop/services.yaml:7:9 error via-on-sync `channel` is only for an async Relationship; add `interaction: async` or remove `channel`via and channel say which broker and channel carry a Publisher’s events to a Subscriber. A sync Relationship is a call that waits for an answer, with no broker in it, so they would add a hop that isn’t there to impact and path answers.
Failing example
Section titled “Failing example”shop/services.yaml:
services: web: name: Web relationships: - to: cart via: events channel: cart.updated cart: name: Cart events: name: Events type: brokerSet interaction: async if the Relationship runs through a broker, or remove via and channel.
shop/services.yaml:
services: web: name: Web relationships: - to: cart interaction: async via: events channel: cart.updated cart: name: Cart events: name: Events type: brokerRelated rules
Section titled “Related rules”via-not-broker:vianames a Service that isn’ttype: broker.return-on-async: A Dynamic View return Step resolves to an async Relationship, which has no reply.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.