Skip to content
Weik.ioUniversity
Try Weik.io

A subscription binds source to channel

Eventing 3 · 3:57

An event subscription binds one source to one channel, so the source's events reach the integrations that read that channel, with no route to write.

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 subscription as the only publisher on invoice-created 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:02An event subscription carries the events of one source into a channel. This
  2. 0:06video adds a subscription between two channels that don't share events yet.
  3. 0:14The earlier Eventing videos left these folders on your machine.
  4. 0:18The event source sends each invoice it brings in onto invoice-files.
  5. 0:23The watcher reads invoice-created, where nothing from invoice-files arrives yet.
  6. 0:33weikio init with the event-subscription kind and the name files-to-invoices scaffolds a folder holding a single document,
  7. 0:41then prints the command to run next.
  8. 0:44The files-to-invoices folder joins the other three.
  9. 0:47Your Weik.io installation keeps a block
  10. 0:50for the subscription beside the source it reads.
  11. 0:53The project named under the kind, sandbox,
  12. 0:57comes from the context the Weik.io CLI works in.
  13. 1:00The spec holds two names,
  14. 1:02invoice-files to read from and invoice-created to write to.
  15. 1:10weikio run on files-to-invoices publishes the document, then builds and deploys it.
  16. 1:18The document declares no version, so this first publish becomes version 0.1.0.
  17. 1:26The new deployment runs in devtest.
  18. 1:29The agent starts a Java process per running integration,
  19. 1:32so the subscription now has one on agent dev.
  20. 1:38weikio logs for invoice-watcher, following the last ten minutes,
  21. 1:42prints each invoice as it arrives.
  22. 1:45Each line is an event the watcher reads off invoice-created.
  23. 1:49The subscription reads invoice-files through the platform's event-source kamelet.
  24. 1:54Then the event-sink kamelet writes those events onto invoice-created,
  25. 1:59with no hand-written route in this flow.
  26. 2:05The first command, weikio undeploy sandbox/invoice-creator,
  27. 2:09takes the deployment out of devtest after asking.
  28. 2:13The creator runs nowhere in devtest now, with its published versions still stored.
  29. 2:18With nothing deployed, weikio delete integration sandbox/invoice-creator removes the integration with its versions,
  30. 2:26asking first.
  31. 2:28The delete cannot be undone.
  32. 2:30The creator is gone from your machine and from the installation.
  33. 2:37weikio get channels lists each channel with its publishers and readers.
  34. 2:43The subscription is the only publisher into invoice-created,
  35. 2:47with the watcher still its reader.
  36. 2:52weikio get eventsubscriptions lists every subscription with the source
  37. 2:56it reads and the channel it writes to.
  38. 3:00The row carries where the deployment runs, devtest, and its state.
  39. 3:08The admin UI's Integrations list, narrowed to Event integrations,
  40. 3:13holds the subscription beside its source.
  41. 3:16The subscription's Definition page joins the source
  42. 3:19channel invoice-files to the channel invoice-created.
  43. 3:26A timer drives the source, so each new invoice lands on invoice-files.
  44. 3:32The subscription takes those events off invoice-files,
  45. 3:35then pushes them on to invoice-created.
  46. 3:39With the creator deleted, the subscription is the only writer onto invoice-created,
  47. 3:45which the watcher still reads.

Next in this track

Eventing 4 · 3:12 Delivery: give a channel a type Watched

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo