Skip to content

via-not-broker

via names a Service that isn’t type: broker.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:7:14 error via-not-broker `via` must name a broker Service, but Service "events" has type "app"

Impact and path answers count the via Service as a hop, and as something both sides depend on. That is true only of a broker: for any other Service it would claim that both sides depend on it when they don’t.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
interaction: async
via: events
cart:
name: Cart
events:
name: Events
type: app

Point via at a broker Service, or mark the Service type: broker.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
interaction: async
via: events
cart:
name: Cart
events:
name: Events
type: broker
  • via-on-sync: via or channel on a sync Relationship.
  • wrong-kind: An id resolves to a kind the field doesn’t accept, such as a Deployment’s service naming a Component or System, or a Relationship’s via naming something other than a Service.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.