Shared worker pool across queues

warningshared-worker-pool-across-queues

One worker pool consuming several queues lets a slow or poisoned queue starve the others. That is precisely what the design's per-queue isolation requirement forbids.

Severity
warning
Selects
every node of kind worker
Components in scope
83
What it checks

It looks at every node of kind worker, and fires when:

  • — all of these hold:
  • — the node has more than 1 incoming edge from a queue
  • — the design requirement `isolation.perQueue` is true
Message
Worker '{{node.id}}' consumes more than one queue while the design requires per-queue isolation. Give each queue its own worker pool.

{{node.id}} style paths are filled in from the node, the edge or the design the finding is about.

Applies to · 83 components
Tripped by · 9

Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.

Source
# yaml-language-server: $schema=../schema/rule.schema.json
# One worker pool consuming several queues means a slow or poisoned queue starves the
# others, which is exactly what the per-queue isolation requirement forbids.
# Tripped by: designs/slack-messaging.broken.yaml
schemaVersion: "1"
type: "rule"
id: "shared-worker-pool-across-queues"
severity: "warning"
select:
  node:
    kind: "worker"
when:
  all:
    - hasEdge:
        direction: "in"
        peerKind: "queue"
        count:
          gt: 1
    - requirement: "isolation.perQueue"
      equals: true
message: "Worker '{{node.id}}' consumes more than one queue while the design requires per-queue isolation. Give each queue its own worker pool."

The same page as markdown, for an agent: /catalogue/rules/shared-worker-pool-across-queues.md