Skip to content
Weik.ioUniversity
Try Weik.io

A subscription binds source to channel

Eventing 3 · 3:41

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:02The source publishes into its own channel, while the watcher reads another.
  2. 0:06This video binds the two channels with an event subscription that the platform then runs.
  3. 0:15This is your Weik.io installation from the earlier Eventing videos.
  4. 0:20The source publishes its invoices into a channel of its own name.
  5. 0:25Nothing carries them to invoice-created yet.
  6. 0:32weikio init, kind event-subscription, files-to-invoices,
  7. 0:37scaffolds a new folder with the subscription document.
  8. 0:40The binding is a small file, files-to-invoices.yaml.
  9. 0:44The subscription gets a block in the hub, under the source it reads.
  10. 0:48The document declares its kind, event-subscription,
  11. 0:52and takes project sandbox from the context.
  12. 0:55The spec holds two names: the source it reads,
  13. 0:58invoice-files, and the channel it publishes into, invoice-created.
  14. 1:06weikio run files-to-invoices publishes the document, deploys it, then follows logs.
  15. 1:16A document with no version becomes 0.1.0.
  16. 1:21The subscription deploys in devtest and runs as a Java process on agent dev.
  17. 1:29weikio logs sandbox/invoice-watcher, following, prints the window, then tails.
  18. 1:35The source's invoices keep reaching the watcher's log.
  19. 1:39The subscription reads invoice-files with the platform's event-source kamelet.
  20. 1:45The same subscription publishes into invoice-created with the event-sink kamelet.
  21. 1:50Both kamelets compile into one flow, so no route file was written.
  22. 1:58invoice-creator is no longer needed,
  23. 2:01so weikio undeploy sandbox/invoice-creator in devtest stops the deployment and leaves the versions.
  24. 2:09Nothing runs invoice-creator now,
  25. 2:11so weikio delete integration removes it with its versions.
  26. 2:16The CLI warns the delete cannot be undone and waits for your answer.
  27. 2:21The creator is gone from the machine and the installation.
  28. 2:28weikio get channels prints publishers and readers for each channel.
  29. 2:33The subscription is now the only publisher on invoice-created.
  30. 2:40weikio get eventsubscriptions lists each subscription with its source,
  31. 2:45its channel and its latest version.
  32. 2:47The subscription's row names the environment it runs in, devtest.
  33. 2:56The subscription also appears in the admin UI's Integrations list,
  34. 3:00under Event integrations.
  35. 3:02Its Definition page draws the binding as an arrow from invoice-files to invoice-created.
  36. 3:13The source invoice-files reads the timer and publishes into its own channel,
  37. 3:18invoice-files, and the subscription carries those events on into invoice-created.
  38. 3:24With invoice-creator deleted, only the subscription publishes into invoice-created,
  39. 3:29and the watcher keeps reading.

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