Acme Marketing Architecture

Level 2 — Container view for downstream integrators — Marketing Data Platform

Level 2 — Container view for downstream integrators — Marketing Data Platform

Diagram type: Container (audience view) Scope: how a business event leaves the platform: the change feed of business_event, the relay, the Service Bus topic, and the three consumer adapters. Audience: teams integrating a downstream system, Data Engineering. Structurizr view: Containers-Downstream in structurizr/workspace.dsl

Overview

The Gold jobs insert business events with a deterministic id. The relay reads the change feed since the last published version and publishes to the data-changed topic with MessageId = event_id, so duplicates are dropped by the broker. Each consumer owns a subscription with its own filter and dead-letter queue: the webhook dispatcher posts signed JSON to registered endpoints, the optional push gateway streams Server-Sent Events to dashboards, and Activator feeds Teams. No pipeline ever calls a downstream system directly.

Diagram

C4Container
    title Container view for downstream integrators
    System_Ext(down, "Downstream systems", "Webhook endpoints, dashboards")
    System_Ext(teams, "Microsoft Teams and Exchange", "Human notifications")

    Container_Boundary(platform, "Marketing Data Platform") {
        ContainerDb(gold, "lh_gold", "Fabric Lakehouse, Delta, CDF", "business_event with Change Data Feed")
        Container(relay, "Relay", "Fabric notebook, Python", "Reads the change feed; publishes; advances the outbox cursor")
        ContainerQueue(sb, "Service Bus", "Azure Service Bus Standard", "data-changed topic; one subscription per consumer; duplicate detection; DLQs")
        Container(disp, "Webhook dispatcher", "Azure Functions, .NET 10", "HMAC-signed JSON; retry; dead-letter")
        Container(sse, "Push gateway", "ASP.NET Core, .NET 10", "Server-Sent Events to dashboards")
        Container(act, "Activator", "Fabric Real-Time Intelligence", "Rules on the eventstream; Teams and email")
    }

    Rel(relay, gold, "Reads business_event changes since the last published version from", "Delta CDF")
    Rel(relay, sb, "Publishes events with MessageId=event_id to the data-changed topic on", "AMQP")
    Rel(sb, disp, "Delivers events matching the subscription filter to", "AMQP")
    Rel(sb, sse, "Delivers events to the dashboard subscription of", "AMQP")
    Rel(sb, act, "Feeds the eventstream consumed by", "eventstream source, SAS key")
    Rel(disp, down, "Posts HMAC-signed payloads to registered endpoints of", "HTTPS, JSON")
    Rel(sse, down, "Streams events to dashboards of", "SSE over HTTPS")
    Rel(act, teams, "Sends Teams messages and email through", "Microsoft Graph")

Legend

Elements

Element Type Technology Responsibility
lh_gold ContainerDb Fabric Lakehouse, Delta, CDF on business_event The outbox: events inserted if absent on event_id = hash(event_type, subject_key, source_version, rule_version)
Relay Container Fabric notebook, Python, azure-servicebus Publishes change-feed rows since the last published version; advances the outbox cursor after publishing
Service Bus ContainerQueue Azure Service Bus Standard data-changed topic; per-consumer subscriptions with SQL filters, duplicate detection on event_id, dead-letter queues, sessions per subject
Webhook dispatcher Container Azure Functions, .NET 10 Signed delivery with exponential retry; dead-letter after 8 attempts; subscriber registry and delivery log in the state store
Push gateway Container (optional) ASP.NET Core, .NET 10 SSE stream with id = event_id for reconnect
Activator Container Fabric Real-Time Intelligence Teams and email per rule; triggers pipelines

Key relationships

From To Intent Protocol / Technology
Relay Service Bus Publish once per event version AMQP, MessageId = event_id
Service Bus Dispatcher, push gateway, Activator Deliver per subscription AMQP; eventstream source
Dispatcher Downstream systems Signed JSON with retries HTTPS; headers in the integration contracts

Notable architectural decisions

Assumptions