Skip to content
Weik.ioUniversity
Try Weik.io

The channel: one integration publishes, another reacts

Eventing 1 · 3:41

A channel is a name that two integrations share, so that one publishes invoices and the other reacts to them. The project declares the channel first, and the channel stores the events that pass through it.

Download the mp4Recorded on 2026.2

What it covers

  • The watcher and creator routes, joined only by the channel name through the kamelets weikio-event-source and weikio-event-sink
  • Declaring the channel in the project with weikio channel create
  • The watcher's log, one line per arriving invoice
  • The channel and its publisher in weikio get channels
  • Stored events and their sequence numbers with weikio events list
  • Reading the stored events in the Events section of the watcher's page in the admin UI

Commands in this video

Terminal
$ weikio channel create sandbox/invoice-created
$ weikio run ./invoice-watcher
$ weikio run ./invoice-creator
$ weikio logs sandbox/invoice-watcher --follow --since 10m
$ weikio get channels
$ weikio events list sandbox/invoice-created
Transcript
  1. 0:02Eventing lets integrations talk to each other without knowing about each other.
  2. 0:06One publishes that an invoice was created, and another reacts;
  3. 0:10the name they share is the channel.
  4. 0:16Two integrations are ready, in the project sandbox the installation creates.
  5. 0:21invoice-watcher reacts, and invoice-creator publishes;
  6. 0:25neither knows the other exists.
  7. 0:30The watcher's route starts from the built-in kamelet weikio-event-source,
  8. 0:35listening on the channel invoice-created.
  9. 0:38The channel is a named topic a project owns; here, invoice-created.
  10. 0:44Every event that arrives is logged, one line per event.
  11. 0:47Before the watcher runs,
  12. 0:49the project declares the channel invoice-created with this command.
  13. 0:53Run publishes and deploys in one command, as the earlier Camel videos taught.
  14. 1:02The watcher builds into version 0.1.0, and its deployment starts.
  15. 1:08Ctrl-C detaches, and the watcher keeps running on the agent.
  16. 1:14The creator's route is a five-second timer that publishes into the same channel.
  17. 1:19Its route ends with the other built-in kamelet,
  18. 1:22weikio-event-sink, given the channel's name.
  19. 1:26Both routes name the channel invoice-created, and the project declared it first.
  20. 1:31A route that names a channel the project has not declared does not start.
  21. 1:35The creator publishes an invoice every five seconds.
  22. 1:42Now the reaction, on the watcher's own log.
  23. 1:45The command prints the lines already written, then keeps printing new ones.
  24. 1:49One log line for every event that arrived on the channel.
  25. 1:53Here is one arriving now: an invoice the creator just published,
  26. 1:58logged by the watcher.
  27. 2:02Neither integration names the other; the whole connection is the channel's name.
  28. 2:06The words for the two ends: a sink kamelet is the end events go to,
  29. 2:12a source kamelet is the end events come from.
  30. 2:17These two are built in, and each takes the channel's name as its one parameter.
  31. 2:25One command shows what the channel's own record holds.
  32. 2:28get channels lists invoice-created, with invoice-creator as its publisher.
  33. 2:34The watcher is the channel's durable reader, and the retention is 30 days.
  34. 2:38The channel also stores what passes through it, in the platform's stream.
  35. 2:43events list takes the channel's name and shows one row per stored event.
  36. 2:48Each carries a seq, the number the row is found by.
  37. 2:52The numbers here are the ones the drawing's tiles carry.
  38. 2:59The admin UI shows the same events on the watcher's page.
  39. 3:03Its Events section is headed Events in devtest, and lists them newest first.
  40. 3:09Opening one shows the headers and the body the creator published.
  41. 3:16Here is the whole picture.
  42. 3:18The creator publishes into the channel's name.
  43. 3:21The channel holds the events, and the stream keeps them.
  44. 3:24The watcher reacts, and neither side knows the other.
  45. 3:27In video two, an event source brings events in from outside.

Next in this track

Eventing 2 · 3:17 An event source brings events in Watched