Skip to content
Weik.ioUniversity
Try Weik.io

A subscription binds source to channel

Eventing 3 · 3:16

An event subscription binds one source to one channel, so events from an event source reach the integrations that read that channel. The platform builds the route itself.

Download the mp4Recorded on 2026.2

What it covers

  • Scaffolding files-to-invoices with weikio init --kind event-subscription
  • The spec, which refers to the source invoice-files and the channel invoice-created
  • The watcher's log showing the source's invoices after weikio run
  • Retiring the hand-written invoice-creator with weikio undeploy and weikio delete integration
  • The channel's one producer and one reader in weikio get channels
  • Checking the binding with weikio get eventsubscriptions and in the admin UI

Commands in this video

Terminal
$ weikio init --kind event-subscription files-to-invoices
$ weikio run ./files-to-invoices
$ weikio logs sandbox/invoice-watcher -f --since 10m
$ weikio undeploy sandbox/invoice-creator --env devtest
$ weikio delete integration sandbox/invoice-creator
$ weikio get eventsubscriptions
$ weikio get channels
Transcript
  1. 0:02In video two, an event source published into its own channel.
  2. 0:06An event subscription binds one source to one channel, and the events flow on.
  3. 0:16In video two, the source invoice-files published into its own channel.
  4. 0:21The watcher from video one reads invoice-created, and nothing binds the two.
  5. 0:32The binding is an event subscription, the fourth folder on your machine.
  6. 0:37weikio init --kind event-subscription writes it, named files-to-invoices.
  7. 0:42The file names its kind, event-subscription, and its project,
  8. 0:47sandbox, taken from the context.
  9. 0:50Its spec fills in the two names:
  10. 0:52source, invoice-files, and channel, invoice-created.
  11. 0:57One document, written once, holds the whole binding.
  12. 1:04Run publishes the document as version 0.1.0,
  13. 1:08and its row names the flow: invoice-files to invoice-created.
  14. 1:16Once its deployment runs, every invoice the source publishes flows on.
  15. 1:23The watcher's log now shows every invoice the source published.
  16. 1:27One event moved from invoice-files to invoice-created,
  17. 1:31and the log line is the proof.
  18. 1:33Nothing in the flow was written by hand: the platform built the route.
  19. 1:42The hand-written publisher retires,
  20. 1:44and the undeploy takes sandbox/invoice-creator out of devtest.
  21. 1:49The delete then removes sandbox/invoice-creator,
  22. 1:53which runs nowhere, with its version.
  23. 1:55With it gone, the source is the channel's one producer.
  24. 2:03Get channels shows it: invoice-files publishes into invoice-created,
  25. 2:08and the watcher reads it.
  26. 2:10One producer, one reader: every event on invoice-created is the source's.
  27. 2:18Get eventsubscriptions lists the binding, with its source and its channel.
  28. 2:23Its one row shows source, channel, latest version and deployments.
  29. 2:33The admin UI lists it under Event integrations, beside the source.
  30. 2:38Its page shows the binding: source channel invoice-files to channel invoice-created.
  31. 2:48Here is the whole picture.
  32. 2:49The timer reads its system, and the source publishes into invoice-files.
  33. 2:54The subscription reads invoice-files and publishes into invoice-created, on the way.
  34. 3:02The hand-written publisher is gone, and the source is the one producer.

Next in this track

Eventing 4 · 2:59 Delivery: give a channel a type Watched