Delivery: give a channel a type
Eventing 4 · 2:59
A channel with a type also delivers its events to a system outside the platform, in this video an accounting system that receives each invoice over HTTP. The platform generates the delivery route itself.
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:02In video three, a subscription bound a source to a channel.
- 0:06This video gives invoice-created a type, so its events also reach another system.
- 0:15So far, invoice-created is a topic among the project's own integrations.
- 0:21The source publishes into it, the subscription forwards, and the watcher reads.
- 0:26The accounting system, the one that should receive the invoices,
- 0:30is not on the platform.
- 0:37Give the channel a type, and the platform generates its delivery route.
- 0:42Any sink kamelet of Camel's catalogue works, http, slack, kafka.
- 0:49channel set names the sink, http, and its parameters.
- 0:54The channel was declared in video one, and this set gives it its type.
- 1:01channel set wrote the type into the channel's document and applied it,
- 1:05and the row built version 0.1.0.
- 1:09The versions block gains its row: sandbox/invoice-created, 0.1.0, latest.
- 1:17It has a type now, but it runs nowhere until it is deployed.
- 1:25deploy runs it in devtest.
- 1:32Its card fills, and its Java chip appears where the creator's was.
- 1:40The generated route reads invoice-created with the event source kamelet.
- 1:45It ends at http-sink, with the parameters the command wrote.
- 1:54The next invoice the source publishes reaches two places.
- 1:57At the receiver, its log line is the POST the channel delivered.
- 2:01And the watcher still hears it, the same event in its log.
- 2:05The channel now has two readers, one inside the platform and one outside.
- 2:17get channels shows the change, and the row names its type, http.
- 2:24The topic is stored as before, and its events now also leave the platform.
- 2:33Here is the whole picture.
- 2:34The source publishes into invoice-files, the subscription forwards,
- 2:39and the watcher reads invoice-created.
- 2:42The channel now has a type, and its events also reach the receiver.
- 2:46One write gave the channel a type, and the platform built the route.
Next in this track
Eventing 5 · 3:09 On the way: filter and steps Watched