This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit 9eb72cf08b8f1c948332733966d53d2eedef35c6 Author: Andrea Cosentino <[email protected]> AuthorDate: Mon May 22 14:08:48 2023 +0200 Add example for securely connecting to Kafka - Routes Signed-off-by: Andrea Cosentino <[email protected]> --- jbang/azure-eventhubs-kafka-ibm-mq/kafka-mq.yaml | 39 ++++++++++++++++++++++ jbang/azure-eventhubs-kafka-ibm-mq/mq-log.yaml | 37 ++++++++++++++++++++ .../azure-eventhubs-kafka-ibm-mq/timer-kafka.yaml | 33 ++++++++++++++++++ 3 files changed, 109 insertions(+) diff --git a/jbang/azure-eventhubs-kafka-ibm-mq/kafka-mq.yaml b/jbang/azure-eventhubs-kafka-ibm-mq/kafka-mq.yaml new file mode 100644 index 0000000..ed950e0 --- /dev/null +++ b/jbang/azure-eventhubs-kafka-ibm-mq/kafka-mq.yaml @@ -0,0 +1,39 @@ +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +# camel-k: dependency=mvn:com.ibm.mq:com.ibm.mq.allclient:9.2.5.0 + +- route: + from: + uri: "kamelet:kafka-source" + parameters: + bootstrapServers: "test12345678910.servicebus.windows.net:9093" + topic: camel-test + consumerGroup: "$Default" + deserializeHeaders: true + steps: + - to: + uri: "kamelet:jms-ibm-mq-sink" + parameters: + channel: DEV.APP.SVRCONN + destinationName: DEV.QUEUE.1 + password: "passw0rd" + queueManager: QM1 + serverName: 172.17.0.2 + serverPort: 1414 + username: app + diff --git a/jbang/azure-eventhubs-kafka-ibm-mq/mq-log.yaml b/jbang/azure-eventhubs-kafka-ibm-mq/mq-log.yaml new file mode 100644 index 0000000..084b898 --- /dev/null +++ b/jbang/azure-eventhubs-kafka-ibm-mq/mq-log.yaml @@ -0,0 +1,37 @@ +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +# camel-k: dependency=mvn:com.ibm.mq:com.ibm.mq.allclient:9.2.5.0 + +- route: + from: + uri: "kamelet:jms-ibm-mq-source" + parameters: + channel: DEV.APP.SVRCONN + destinationName: DEV.QUEUE.1 + password: "passw0rd" + queueManager: QM1 + serverName: 172.17.0.2 + serverPort: 1414 + username: app + steps: + - to: + uri: "kamelet:log-sink" + parameters: + showStreams: true + showHeaders: true + multiline: true diff --git a/jbang/azure-eventhubs-kafka-ibm-mq/timer-kafka.yaml b/jbang/azure-eventhubs-kafka-ibm-mq/timer-kafka.yaml new file mode 100644 index 0000000..73ea379 --- /dev/null +++ b/jbang/azure-eventhubs-kafka-ibm-mq/timer-kafka.yaml @@ -0,0 +1,33 @@ +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +- route: + from: + uri: "kamelet:timer-source" + parameters: + message: "test" + period: "10000" + repeatCount: 5 + steps: + - set-header: + name: JMSCorrelationID + simple: test + - to: + uri: "kamelet:kafka-sink" + parameters: + bootstrapServers: "test12345678910.servicebus.windows.net:9093" + topic: camel-test
