9.4. Usage
9.4.1. Camel JBang usage リンクのコピーリンクがクリップボードにコピーされました!
9.4.1.1. Prerequisites for JBang リンクのコピーリンクがクリップボードにコピーされました!
- Install JBang.
You have executed the following command:
jbang app install camel@apache/camel
9.4.1.2. Running a route with JBang リンクのコピーリンクがクリップボードにコピーされました!
Suppose you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command.
camel run route.yaml
9.4.2. Knative Sink リンクのコピーリンクがクリップボードにコピーされました!
You can use the aws-lambda-sink Kamelet as a Knative sink by binding it to a Knative object.
aws-lambda-sink-binding.yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: aws-lambda-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: aws-lambda-sink
properties:
accessKey: "The Access Key"
function: "The Function Name"
region: "eu-west-1"
secretKey: "The Secret Key"
9.4.3. Kafka Sink リンクのコピーリンクがクリップボードにコピーされました!
You can use the aws-lambda-sink Kamelet as a Kafka sink by binding it to a Kafka topic.
aws-lambda-sink-binding.yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: aws-lambda-sink-binding
spec:
source:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: aws-lambda-sink
properties:
accessKey: "The Access Key"
function: "The Function Name"
region: "eu-west-1"
secretKey: "The Secret Key"