Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Spring-RabbitMQ Sink and Source Kamelet #1897

Merged
merged 8 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@
* xref:splunk-hec-sink.adoc[]
* xref:splunk-sink.adoc[]
* xref:splunk-source.adoc[]
* xref:spring-rabbitmq-sink.adoc[]
* xref:spring-rabbitmq-source.adoc[]
* xref:sqlserver-sink.adoc[]
* xref:sqlserver-source.adoc[]
* xref:ssh-sink.adoc[]
Expand Down
97 changes: 97 additions & 0 deletions kamelets/spring-rabbitmq-sink.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# ---------------------------------------------------------------------------
# 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: spring-rabbitmq-sink
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "4.4.0-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcxcHgiIGhlaWdodD0iMjcxcHgiIHZpZXdCb3g9Ii03LjUgMCAyNzEgMjcxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj48cGF0aCBkPSJNMjQ1LjQ0IDEwOC4zMDhoLTg1LjA5YTcuNzM4IDcuNzM4IDAgMCAxLTcuNzM1LTcuNzM0di04OC42OEMxNTIuNjE1IDUuMzI3IDE0Ny4yOSAwIDE0MC43MjYgMGgtMzAuMzc1Yy02LjU2OCAwLTExLjg5IDUuMzI3LTExLjg5IDExLjg5NHY4OC4xNDNjMCA0LjU3My0zLjY5NyA4LjI5LTguMjcgOC4zMWwtMjcuODg1LjEzM2MtNC42MTIuMDI1LTguMzU5LTMuNzE3LTguMzUtOC4zMjVsLjE3My04OC4yNDFDNTQuMTQ0IDUuMzM3IDQ4LjgxNyAwIDQyLjI0IDBIMTEuODlDNS4zMjEgMCAwIDUuMzI3IDAgMTEuODk0VjI2MC4yMWMwIDUuODM0IDQuNzI2IDEwLjU2IDEwLjU1NSAxMC41NkgyNDUuNDRjNS44MzQgMCAxMC41Ni00LjcyNiAxMC41Ni0xMC41NlYxMTguODY4YzAtNS44MzQtNC43MjYtMTAuNTYtMTAuNTYtMTAuNTZ6bS0zOS45MDIgOTMuMjMzYzAgNy42NDUtNi4xOTggMTMuODQ0LTEzLjg0MyAxMy44NDRIMTY3LjY5Yy03LjY0NiAwLTEzLjg0NC02LjE5OS0xMy44NDQtMTMuODQ0di0yNC4wMDVjMC03LjY0NiA2LjE5OC0xMy44NDQgMTMuODQ0LTEzLjg0NGgyNC4wMDVjNy42NDUgMCAxMy44NDMgNi4xOTggMTMuODQzIDEzLjg0NHYyNC4wMDV6IiBmaWxsPSIjRjYwIi8+PC9zdmc+"
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "RabbitMQ"
camel.apache.org/kamelet.namespace: "Messaging"
labels:
camel.apache.org/kamelet.type: "sink"
spec:
definition:
title: "RabbitMQ Sink"
description: |-
Send data to a RabbitMQ Broker.
required:
- host
- port
- exchangeName
type: object
properties:
host:
title: Server Address
description: RabbitMQ broker address
type: string
example: "localhost"
port:
title: Server Port
description: RabbitMQ broker port
type: int
example: 5672
routingKey:
title: Routing Key
description: The routing key to use when binding a consumer queue to the exchange
type: string
username:
title: Username
description: The username to access the RabbitMQ server
type: string
x-descriptors:
- urn:camel:group:credentials
password:
title: Password
description: The password to access the RabbitMQ server
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
exchangeName:
title: Exchange name
description: The exchange name determines the exchange the queue will be bound to
type: string
queues:
title: Queue name
description: The queue to receive messages from
type: string
dependencies:
- "camel:spring-rabbitmq"
- "camel:kamelet"
template:
beans:
- name: connectionFactory
type: "#class:org.springframework.amqp.rabbit.connection.CachingConnectionFactory"
properties:
username: '{{?username}}'
password: '{{?password}}'
host: '{{host}}'
port: '{{port}}'
from:
uri: "kamelet:source"
steps:
- to:
uri: "spring-rabbitmq://{{exchangeName}}"
parameters:
connectionFactory: "#bean:{{connectionFactory}}"
routingKey: "{{?routingKey}}"
queues: "{{?queues}}"
102 changes: 102 additions & 0 deletions kamelets/spring-rabbitmq-source.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# ---------------------------------------------------------------------------
# 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: spring-rabbitmq-source
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "4.4.0-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcxcHgiIGhlaWdodD0iMjcxcHgiIHZpZXdCb3g9Ii03LjUgMCAyNzEgMjcxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj48cGF0aCBkPSJNMjQ1LjQ0IDEwOC4zMDhoLTg1LjA5YTcuNzM4IDcuNzM4IDAgMCAxLTcuNzM1LTcuNzM0di04OC42OEMxNTIuNjE1IDUuMzI3IDE0Ny4yOSAwIDE0MC43MjYgMGgtMzAuMzc1Yy02LjU2OCAwLTExLjg5IDUuMzI3LTExLjg5IDExLjg5NHY4OC4xNDNjMCA0LjU3My0zLjY5NyA4LjI5LTguMjcgOC4zMWwtMjcuODg1LjEzM2MtNC42MTIuMDI1LTguMzU5LTMuNzE3LTguMzUtOC4zMjVsLjE3My04OC4yNDFDNTQuMTQ0IDUuMzM3IDQ4LjgxNyAwIDQyLjI0IDBIMTEuODlDNS4zMjEgMCAwIDUuMzI3IDAgMTEuODk0VjI2MC4yMWMwIDUuODM0IDQuNzI2IDEwLjU2IDEwLjU1NSAxMC41NkgyNDUuNDRjNS44MzQgMCAxMC41Ni00LjcyNiAxMC41Ni0xMC41NlYxMTguODY4YzAtNS44MzQtNC43MjYtMTAuNTYtMTAuNTYtMTAuNTZ6bS0zOS45MDIgOTMuMjMzYzAgNy42NDUtNi4xOTggMTMuODQ0LTEzLjg0MyAxMy44NDRIMTY3LjY5Yy03LjY0NiAwLTEzLjg0NC02LjE5OS0xMy44NDQtMTMuODQ0di0yNC4wMDVjMC03LjY0NiA2LjE5OC0xMy44NDQgMTMuODQ0LTEzLjg0NGgyNC4wMDVjNy42NDUgMCAxMy44NDMgNi4xOTggMTMuODQzIDEzLjg0NHYyNC4wMDV6IiBmaWxsPSIjRjYwIi8+PC9zdmc+"
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "RabbitMQ"
camel.apache.org/kamelet.namespace: "Messaging"
labels:
camel.apache.org/kamelet.type: "source"
spec:
definition:
title: "RabbitMQ Source"
description: |-
Receive data from a RabbitMQ Broker.
required:
- host
- port
- exchangeName
type: object
properties:
host:
title: Server Address
description: RabbitMQ broker address
type: string
example: "localhost"
port:
title: Server Port
description: RabbitMQ broker port
type: int
example: 5672
routingKey:
title: Routing Key
description: The routing key to use when binding a consumer queue to the exchange
type: string
username:
title: Username
description: The username to access the RabbitMQ server
type: string
x-descriptors:
- urn:camel:group:credentials
password:
title: Password
description: The password to access the RabbitMQ server
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
exchangeName:
title: Exchange name
description: The exchange name determines the exchange the queue will be bound to
type: string
queues:
title: Queue name
description: The queue to receive messages from
type: string
autoDeclare:
title: Auto Declare
description: The routing key to use when binding a consumer queue to the exchange
type: boolean
default: false
dependencies:
- "camel:spring-rabbitmq"
- "camel:kamelet"
template:
beans:
- name: connectionFactory
type: "#class:org.springframework.amqp.rabbit.connection.CachingConnectionFactory"
properties:
username: '{{?username}}'
password: '{{?password}}'
host: '{{host}}'
port: '{{port}}'
from:
uri: "spring-rabbitmq://{{exchangeName}}"
parameters:
connectionFactory: "#bean:{{connectionFactory}}"
routingKey: "{{?routingKey}}"
queues: "{{?queues}}"
autoDeclare: "{{autoDeclare}}"
steps:
- to: "kamelet:sink"
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# ---------------------------------------------------------------------------
# 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: spring-rabbitmq-sink
annotations:
camel.apache.org/kamelet.support.level: "Preview"
camel.apache.org/catalog.version: "4.4.0-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjcxcHgiIGhlaWdodD0iMjcxcHgiIHZpZXdCb3g9Ii03LjUgMCAyNzEgMjcxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj48cGF0aCBkPSJNMjQ1LjQ0IDEwOC4zMDhoLTg1LjA5YTcuNzM4IDcuNzM4IDAgMCAxLTcuNzM1LTcuNzM0di04OC42OEMxNTIuNjE1IDUuMzI3IDE0Ny4yOSAwIDE0MC43MjYgMGgtMzAuMzc1Yy02LjU2OCAwLTExLjg5IDUuMzI3LTExLjg5IDExLjg5NHY4OC4xNDNjMCA0LjU3My0zLjY5NyA4LjI5LTguMjcgOC4zMWwtMjcuODg1LjEzM2MtNC42MTIuMDI1LTguMzU5LTMuNzE3LTguMzUtOC4zMjVsLjE3My04OC4yNDFDNTQuMTQ0IDUuMzM3IDQ4LjgxNyAwIDQyLjI0IDBIMTEuODlDNS4zMjEgMCAwIDUuMzI3IDAgMTEuODk0VjI2MC4yMWMwIDUuODM0IDQuNzI2IDEwLjU2IDEwLjU1NSAxMC41NkgyNDUuNDRjNS44MzQgMCAxMC41Ni00LjcyNiAxMC41Ni0xMC41NlYxMTguODY4YzAtNS44MzQtNC43MjYtMTAuNTYtMTAuNTYtMTAuNTZ6bS0zOS45MDIgOTMuMjMzYzAgNy42NDUtNi4xOTggMTMuODQ0LTEzLjg0MyAxMy44NDRIMTY3LjY5Yy03LjY0NiAwLTEzLjg0NC02LjE5OS0xMy44NDQtMTMuODQ0di0yNC4wMDVjMC03LjY0NiA2LjE5OC0xMy44NDQgMTMuODQ0LTEzLjg0NGgyNC4wMDVjNy42NDUgMCAxMy44NDMgNi4xOTggMTMuODQzIDEzLjg0NHYyNC4wMDV6IiBmaWxsPSIjRjYwIi8+PC9zdmc+"
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "RabbitMQ"
camel.apache.org/kamelet.namespace: "Messaging"
labels:
camel.apache.org/kamelet.type: "sink"
spec:
definition:
title: "RabbitMQ Sink"
description: |-
Send data to a RabbitMQ Broker.
required:
- host
- port
- exchangeName
type: object
properties:
host:
title: Server Address
description: RabbitMQ broker address
type: string
example: "localhost"
port:
title: Server Port
description: RabbitMQ broker port
type: int
example: 5672
routingKey:
title: Routing Key
description: The routing key to use when binding a consumer queue to the exchange
type: string
username:
title: Username
description: The username to access the RabbitMQ server
type: string
x-descriptors:
- urn:camel:group:credentials
password:
title: Password
description: The password to access the RabbitMQ server
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
exchangeName:
title: Exchange name
description: The exchange name determines the exchange the queue will be bound to
type: string
queues:
title: Queue name
description: The queue to receive messages from
type: string
dependencies:
- "camel:spring-rabbitmq"
- "camel:kamelet"
template:
beans:
- name: connectionFactory
type: "#class:org.springframework.amqp.rabbit.connection.CachingConnectionFactory"
properties:
username: '{{?username}}'
password: '{{?password}}'
host: '{{host}}'
port: '{{port}}'
from:
uri: "kamelet:source"
steps:
- to:
uri: "spring-rabbitmq://{{exchangeName}}"
parameters:
connectionFactory: "#bean:{{connectionFactory}}"
routingKey: "{{?routingKey}}"
queues: "{{?queues}}"
Loading
Loading