An event source brings events in
Eventing 2 · 3:26
An event source brings events from a system outside Weik.io into a channel named after the source. The source is a YAML document, and Weik.io runs it like any integration.
This part of the video couldn't be loaded.
What it covers
- Scaffolding an event source document with
weikio init --kind event-source - Giving each event a body with the
messageparameter - Building and deploying the source with
weikio run - The
invoice-fileschannel and its stored events inweikio events list - The source's version and definition with
weikio get eventsourcesandweikio describe - The source under Event integrations on the admin UI's Integrations page
Commands in this video
Terminal
$ weikio init --kind event-source invoice-files
$ weikio run ./invoice-files
$ weikio events list sandbox/invoice-files
$ weikio get channels
$ weikio get eventsources
$ weikio describe integration sandbox/invoice-filesTranscript
- 0:02Things happen in systems outside your Weik.io installation without anyone asking.
- 0:07This video has a small document bring them in for the installation's flows to read.
- 0:16The creator and the watcher are hand-written integrations from the earlier eventing video,
- 0:21with their versions at the hub.
- 0:24In devtest, the creator publishes invoices into the channel invoice-created,
- 0:29where the watcher reacts.
- 0:31Both run on agent dev.
- 0:36A source is a document the Weik.io CLI scaffolds with weikio init for an event source named invoice-files.
- 0:45The file holds a name, project sandbox from the context and a short spec.
- 0:50The spec names a timer that fires once a minute.
- 0:56The message parameter gives every event an invoice body.
- 1:00weikio run on the invoice-files folder builds and deploys the document on your installation.
- 1:09A source is an integration like any other.
- 1:12The new version deploys into devtest and runs on agent dev in its own Java process.
- 1:18The timer fires once a minute, so events land on the source's own channel.
- 1:26weikio events list for sandbox/invoice-files reads the channel's stored events,
- 1:32one row per message, with invoice-files in the SOURCE column.
- 1:36The newest row matches the new tile on the source's chip.
- 1:41weikio get channels lists both channels.
- 1:44The source made that channel by publishing into it,
- 1:47so it has a publisher and no reader yet.
- 1:53The source process publishes into the channel through its Camel source kamelet,
- 1:57timer-source, which the document writes short as timer.
- 2:04weikio get eventsources lists the project's sources.
- 2:08The row carries its type, timer, latest version and deployment state in devtest.
- 2:16weikio describe integration sandbox/invoice-files reads like any integration:
- 2:22versions, deployments, the channel it publishes into.
- 2:26The description ends with the document's fields,
- 2:29including the timer and the message body.
- 2:36The admin UI lists the source among the installation's integrations.
- 2:40Event kinds are listed beside the Camel integrations, each item with its count.
- 2:46The source's page names the kamelet it reads through and the channel it publishes to.
- 2:56The installation now runs a second flow beside the first.
- 2:59A source kamelet in the invoice-files process reads the outside system,
- 3:05here a timer.
- 3:06The source publishes what it takes in onto the channel invoice-files.
- 3:11The channel keeps each event until something reads it,
- 3:14as invoice-created does for the watcher.
Next in this track
Eventing 3 · 3:41 A subscription binds source to channel Watched