Skip to content
TutorialIntroduction

Tutorial: Build a Distribution

Build a Distribution: one extractor publishes placed and cancelled orders on one topic, and two loaders deliver them to separate destinations.

You scaffold the first pass and run it. Then you add routing at two levels:

  • Within a Component. The extractor stamps each order with a CloudEvent type, order-placed or order-cancelled. One loader handles both, each through its own pipeline. The framework picks the pipeline from the type.
  • Between Components. The System declares which messages each loader receives. The Dapr sidecar applies those rules before a message reaches the loader.

This tutorial is written for intropy CLI 2.1.1 and intropy-templates 2.0.0. A workspace scaffolded with CLI 1.x needs CLI 1.0.1 and --template-version v1.0.3; see Workspaces created before CLI 2.0.

ERPlocally: a folderSYSTEM · ORDER-NOTIFICATIONSerp-extractororder-placedorder-cancelledPub/subordersrouted bysubscriptionwms-loaderorder-placedorder-cancelledweb-loaderorder-placed onlyWMSlocally: a folderWeb shoplocally: a folder
FIG D1Distribution flow: one extractor publishes two message types on the orders topic; the sidecar routes both to the WMS loader, which runs one pipeline per type, and only order-placed to the web loader.
Your code External touchpoint Infrastructure, not your code

Each chapter ends in a runnable state.

  1. Scaffold the components — create the extractor and first loader
  2. Create the System and run it — assemble the host and run two orders
  3. Route within a Component — publish cancellations as a second type and give the WMS loader a pipeline for them
  4. Route between Components — add a web loader that receives only placed orders