Catalog/C family/C03
Proposed specificationSource-located exemplarH1H3

Publish-subscribe

Decouple producers from consumers.

JOIN POINTtopic_based_event_deliveryRECORD STATUSCandidate · v0.1.0
UML class view for Publish-subscribe, showing participant roles, received calls, and analytical dependencies
FIG. C03 / UML CLASS VIEW
Object interaction diagram for Publish-subscribe, showing role collaboration and a numbered message sequence
FIG. C03 / OBJECT INTERACTIONS
Context
Producers and consumers are decoupled through topics.
Trigger
A message is published to a topic.
Structure
Topic schema, broker or bus, subscribers, and delivery policy.
Effect
Matching subscribers receive the message under declared ordering and durability rules.
Requires
Topic identity and event compatibility are defined.
Ensures
Delivery or drop is observable and subscriber selection is attributable.
Invariant
A subscriber cannot read a topic outside its authorization.
Violation
Duplicate, late, or lost delivery follows an explicit semantic contract.

Negative control

Directly invoking known listeners is C02 rather than C03.

Permitted variation

In-process bus, OS socket pubsub, cloud queue, and durable stream.

Test obligation

Test multi-subscriber delivery, no subscriber, disconnect, duplicate, and auth.

Evolution question

Did pubsub gain durability, replay, and authorization?

PROMPT SKETCH
Deliver events by declared topic. Record whether a subscriber received or dropped an event, and make subscriber selection attributable to the topic and compatibility rules.
CODE DESIGN / PYTHON
def publish(event, bus):
    subscribers = bus.subscribers(event.topic)
    delivered = []
    for subscriber in subscribers:
        if not subscriber.accepts(event.schema):
            delivered.append(Dropped(subscriber.id, "schema mismatch"))
            continue
        subscriber.deliver(event)
        delivered.append(Delivered(subscriber.id))
    bus.record(event.id, event.topic, delivered)

Illustrative design sketch. Publish-subscribe needs a delivery record; broadcast is not the same as delivery. This example is a teaching aid, not implementation evidence or a conformance claim.

Join point
topic_based_event_delivery
Source locator
See the source record.
Lexical cue
(?i)\b(?:pub(?:lish)?[_-]?sub(?:scribe)?|topic[_-]?bus|event[_-]?bus|subscriber)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.
Aliases
None
Canonical exemplar
mastra-ai/mastrapackages/core/src/events/pubsub.ts:19Support: packages/core/src/events/subscribe-start-position.test.ts:25
Negative control
Directly invoking known listeners is C02 rather than C03.

Scope-anchored review. pohe-agent analyze <repo> --pattern C03 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗

Source-located exemplar

A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.

Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.

ANY-EVIDENCE FAMILY COVERAGE24/36

66.7% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.

Current lexical-cue repositories: 25 / 41
Canonical source anchormastra-ai/mastra 899383db98e0packages/core/src/events/pubsub.ts:19

Topic-based publish/subscribe abstraction.

Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:pub(?:lish)?[_-]?sub(?:scribe)?|topic[_-]?bus|event[_-]?bus|subscriber)\b

This expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.