73.3. Usage
73.3.1. Camel JBang usage リンクのコピーリンクがクリップボードにコピーされました!
73.3.1.1. Prerequisites for Jbang リンクのコピーリンクがクリップボードにコピーされました!
- Install JBang.
Install
camelas a JBang command by running:jbang app install camel@apache/camel
For example, 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 run it directly through the following command.
camel run route.yaml
73.3.2. Kafka Sink リンクのコピーリンクがクリップボードにコピーされました!
You can use the splunk-sink Kamelet as a Kafka sink by binding it to a Kafka topic.
splunk-sink-binding.yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: splunk-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: splunk-sink
properties:
password: The Password
serverHostname: my_server_splunk.com
username: The Username
73.3.3. Prerequisites for Kafka リンクのコピーリンクがクリップボードにコピーされました!
- Install Strimzi.
-
You must create a topic named
my-topicin the current namespace.
73.3.3.1. Procedure for using the cluster CLI with Kafka リンクのコピーリンクがクリップボードにコピーされました!
-
Save the
splunk-sink-binding.yamlfile to your local drive, and then edit it as needed for your configuration. Run the sink with the following command:
kubectl apply -f splunk-sink-binding.yaml
73.3.3.2. Procedure for using the Kamel CLI with Kafka リンクのコピーリンクがクリップボードにコピーされました!
Configure and run the sink with the following command.
kamel bind splunk-sink -p "sink.password=The Password" -p "sink.serverHostname=my_server_splunk.com" -p "sink.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
This command creates the Pipe in the current namespace on the cluster.