73.3. Usage


73.3.1. Camel JBang usage

73.3.1.1. Prerequisites for Jbang

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-topic in the current namespace.

73.3.3.1. Procedure for using the cluster CLI with Kafka

  1. Save the splunk-sink-binding.yaml file to your local drive, and then edit it as needed for your configuration.
  2. 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.

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る