Connecting to another system
Camel 5 · 4:30
An integration that calls an outside HTTP service needs extra libraries, declared in integration.yaml and resolved by Weik.io from Maven Central when you publish. The video also covers kamelets, the reusable route snippets of Camel.
This part of the video couldn't be loaded.
What it covers
- Calling an example service and logging fields from its JSON reply
- Declaring
camel:httpandcamel:jacksonin the dependencies list ofintegration.yaml - The two dependency forms, a Camel component name and
mvn:group:artifact:version - A misspelled dependency, found in the build log with
weikio logs --build --version - The project's kamelets, listed with
weikio get kameletsand on the project page - Writing kamelets to disk with
weikio kamelets pull, for a local run without the installation
Commands in this video
Terminal
$ weikio run ./hello
$ weikio logs sandbox/hello --build --version 0.1.6
$ weikio get kamelets
$ weikio kamelets pull ./kameletsTranscript
- 0:02Until now, hello worked with its own files.
- 0:05Now the route gains a call to another system.
- 0:11The drawing shows the hello folder and your Weik.io installation,
- 0:15as the earlier videos left them.
- 0:17Weik.io keeps all of hello's published versions,
- 0:21with 0.1.4 on top carrying latest.
- 0:25The deployment runs 0.1.4 on agent dev,
- 0:29as a plain Java process.
- 0:32Each Java process sends its log lines,
- 0:35traces and metrics to the installation.
- 0:40The panel shows the two files you write: the route,
- 0:43and the manifest with its example fields commented out.
- 0:49The route gained an HTTPS call to a service.
- 0:53The manifest names the dependency camel:http,
- 0:57so the build ships it with the integration.
- 1:00A Camel component is listed as camel: and its name.
- 1:04weikio run, the hello folder, publishes it as a new version.
- 1:100.1.5 builds with its library resolved, so it is latest.
- 1:18The deployment follows latest,
- 1:20so agent dev runs it in seconds.
- 1:22The log now carries the service's answer.
- 1:28Each tick the Java process makes
- 1:30the call with its Authorization header.
- 1:35The example service answers with JSON,
- 1:38which the route logs as it came.
- 1:44Weik.io resolves the dependencies when it builds a version.
- 1:48The route reads the answer as JSON now,
- 1:51so the manifest gains a second component, camel:jakson.
- 1:56weikio run, the hello folder, starts the build again.
- 2:00The name is misspelled,
- 2:01so the build fails and the run stops.
- 2:040.1.6 stays with its build log. Latest stays on 0.1.5,
- 2:11the last version that built.
- 2:15Agent dev still runs 0.1.5, so the answer keeps arriving.
- 2:25weikio logs for hello reads the build log of version 0.1.6.
- 2:32The last error names the artifact
- 2:34the build could not download.
- 2:39Fix the name, then weikio run, the hello folder, again.
- 2:430.1.7 builds, so latest moves to it.
- 2:50The deployment follows latest, so agent dev moves to 0.1.7.
- 2:56The logged answer now arrives as JSON fields.
- 3:03The installation also ships ready-made route pieces,
- 3:07called kamelets.
- 3:08weikio get kamelets lists the
- 3:11project's kamelets and the platform's.
- 3:15The project shares a kamelet, erp-cart-source,
- 3:19so every version the project builds carries it.
- 3:22A kamelet file in the integration's folder takes
- 3:25precedence over the project's and the platform's.
- 3:28The listing stays the same,
- 3:30because weikio get kamelets reads the project, not the folder.
- 3:37The admin UI lists the same kamelets.
- 3:41The Add kamelet dialog stores a kamelet
- 3:44file or YAML as a project kamelet.
- 3:50The last step pulls these kamelets onto disk.
- 3:53weikio kamelets pull, into a kamelets folder,
- 3:58writes one file per kamelet.
- 4:04This video added a call, libraries and kamelets.
- 4:08The manifest names libraries, so a wrong name stops only the build.
- 4:13The route calls out and logs the answer.
- 4:16Kamelets come from the project, platform or folder.
Next in this track
Camel 6 · 3:14 Custom metrics Watched