All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kamelets.infinispan-sink.kamelet.yaml Maven / Gradle / Ivy

The newest version!
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
  name: infinispan-sink
  labels:
    camel.apache.org/kamelet.type: "sink"
  annotations:
    camel.apache.org/kamelet.support.level: "Stable"
    camel.apache.org/catalog.version: "4.8.0"
    camel.apache.org/provider: "Apache Software Foundation"
    camel.apache.org/kamelet.group: "Infinispan"
    camel.apache.org/kamelet.namespace: "Cache"
    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iYXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAyNCAyMTUiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojMGIyNTQ1O30uY2xzLTJ7ZmlsbDojNTk5ZmM2O308L3N0eWxlPjwvZGVmcz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjI5Ny4yNCIgeT0iMS45OCIgd2lkdGg9IjExLjkiIGhlaWdodD0iMTU4LjEyIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMzk1LjI1LDY0Ljg4Yy03LjgxLTkuNDUtMTguOS0xNC4yNC0zMy0xNC4yNC0xMy43NywwLTI0LjczLDQuNzUtMzIuNjQsMTQuMTFWNTIuMzlIMzE4LjI3dj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MODA3LjUsMTI1bC43MiwyLjc5YzEuMjEsNC42OCw0Ljc4LDEwLjcsNC43OCwxMC43Ii8+PHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxIiB5PSIxIiB3aWR0aD0iMjA5LjE3IiBoZWlnaHQ9IjIwOS4xNyIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTExNi44MSwxMDUuNThoMGE4Miw4MiwwLDAsMC04Mi04MlY0NmE1OS42NSw1OS42NSwwLDAsMSw1OS41OSw1OS41OWgwYTgyLDgyLDAsMCwwLDgyLDgyLjA1VjE2NS4xOEE1OS42Niw1OS42NiwwLDAsMSwxMTYuODEsMTA1LjU4WiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTkwLjE5LDEyNy40NmE1OS42OSw1OS42OSwwLDAsMS01NS40MiwzNy43MnYyMi40NWE4MS45Miw4MS45MiwwLDAsMCw2Ni42Ny0zNC4yNkE4OC41Miw4OC41MiwwLDAsMSw5MC4xOSwxMjcuNDZaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTIxLDgzLjcxQTU5LjY5LDU5LjY5LDAsMCwxLDE3Ni40LDQ2VjIzLjU0QTgxLjkyLDgxLjkyLDAsMCwwLDEwOS43Myw1Ny44LDg4LjUyLDg4LjUyLDAsMCwxLDEyMSw4My43MVoiLz48L3N2Zz4="
spec:
  definition:
    title: "Infinispan Sink"
    description: |-
      Write object to an Infinispan cache.

      The Kamelet expects the following headers to be set:

      - `key` / `ce-key`: as the key to use when put an object in the Infinispan cache.

      If the header won't be set the exchange ID will be used as key.
    required:
      - cacheName
      - hosts
      - username
      - password
    type: object
    properties:
      cacheName:
        title: Cache Name
        description: The name of the Infinispan cache to use
        type: string
      hosts:
        title: Hosts
        description: Specifies the host of the cache on Infinispan instance
        type: string
      secure:
        title: Secure
        description: If the Infinispan instance is secured or not
        type: boolean
        default: true
      username:
        title: Username
        description: Username to connect to Infinispan.
        type: string
        x-descriptors:
        - urn:camel:group:credentials
      password:
        title: Password
        description: Password to connect to Infinispan.
        type: string
        format: password
        x-descriptors:
        - urn:camel:group:credentials
      saslMechanism:
        title: SASL Mechanism
        description: The SASL Mechanism to use
        type: string
        default: "DIGEST-MD5"
      securityRealm:
        title: Security Realm
        description: Define the security realm to access the infinispan instance
        type: string
        default: "default"
      securityServerName:
        title: Security Server name
        description: Define the security server name to access the infinispan instance
        type: string
        default: "infinispan"
  dependencies:
    - "camel:kamelet"
    - "camel:core"
    - "camel:infinispan"
  template:
    beans:
      - name: local-infinispan
        type: "#class:org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent"
    from:
      uri: "kamelet:source"
      steps:
      - choice:
          when:
          - simple: "${header[key]}"
            steps:
            - setHeader:
                name: CamelInfinispanKey
                simple: "${header[key]}"
          - simple: "${header[ce-key]}"
            steps:
            - setHeader:
                name: CamelInfinispanKey
                simple: "${header[ce-key]}"
          otherwise:
            steps:
            - setHeader:
                name: CamelInfinispanKey
                simple: "${exchangeId}"
      - setHeader:
          name: CamelInfinispanValue
          simple: "${body}"
      - to:
          uri: "{{local-infinispan}}:{{cacheName}}"
          parameters:
            hosts: "{{hosts}}"
            secure: "{{secure}}"
            username: "{{username}}"
            password: "{{password}}"
            saslMechanism: "{{saslMechanism}}"
            securityRealm: "{{securityRealm}}"
            securityServerName: "{{securityServerName}}"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy