Delivery: give a channel a type
Eventing 4 · 3:12
A channel with a type also delivers its events to a system outside Weik.io, in this video an accounting system that receives each invoice over HTTP. Weik.io generates the delivery route itself.
This part of the video couldn't be loaded.
What it covers
- Any sink kamelet from Camel's catalogue as a channel's type, here
http - Giving the declared channel its type with
weikio channel set - The channel's new version in the versions block
- Deploying the channel to devtest, and its generated delivery route
- The next invoice arriving at the receiver as a POST and in the watcher's log
- The channel's type,
http, inweikio get channels
Commands in this video
Terminal
$ weikio channel set sandbox/invoice-created --type http --param url=http://receiver.example/invoices --param method=POST
$ weikio deploy sandbox/invoice-created --env devtest -y
$ weikio logs sandbox/invoice-watcher -f --since 10m
$ weikio get channelsTranscript
- 0:02Invoices flow on a channel inside the platform,
- 0:05but the accounting system isn't on it.
- 0:07Give the channel a type, and the platform builds the delivery itself.
- 0:15This is your Weik.io installation from the earlier Eventing videos.
- 0:20Invoices go into invoice-files, then through files-to-invoices into invoice-created.
- 0:26invoice-watcher,
- 0:27invoice-files and files-to-invoices run in devtest. A new invoice lands on invoice-created every minute.
- 0:35Nothing on the drawing reaches the accounting system yet.
- 0:43invoice-created has no type, so it builds no route.
- 0:47The Weik.io CLI's channel set edits invoice-created, declared in an earlier Eventing video,
- 0:54to give it the type http.
- 0:57The sink takes two parameters, the receiver's address and the POST method.
- 1:02The type names a sink kamelet from the Camel catalog.
- 1:08The type names the delivery's sink kamelet: http is delivered by http-sink.
- 1:15The set wrote the type into the channel's document,
- 1:18then the build made its first version.
- 1:21A channel with a type is an integration like any other.
- 1:24Nothing new runs yet,
- 1:25because the channel works only after it's deployed in an environment.
- 1:32weikio deploy sandbox/invoice-created to devtest puts its route to work without pausing for confirmation.
- 1:44The route starts by reading invoice-created through the same event-source kamelet a hand-written integration uses.
- 1:52It ends at the http sink kamelet with the address and method as written.
- 2:01The latest invoice reached the accounting system. The receiver's log records the POST the delivery brought in.
- 2:08weikio logs for invoice-watcher reads ten minutes of the watcher's log,
- 2:14then follows live.
- 2:16The watcher's log holds the same invoice, unchanged. The channel now feeds both:
- 2:21the watcher and the accounting system.
- 2:28weikio get channels lists the project's channels.
- 2:32The invoice-created row carries http now, where a dash stood.
- 2:37The row keeps its events, with the same publisher and reader.
- 2:45The timer source publishes each invoice into invoice-files.
- 2:49The subscription forwards them on into invoice-created.
- 2:53The channel's type carries every invoice across the platform's edge to the accounting system.
- 2:58The route that does it is the platform's making,
- 3:01built and run like any other integration.
Next in this track
Eventing 5 · 3:21 On the way: filter and steps Watched