-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JMS source kamelet for AMQP 1.0
- Loading branch information
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT | ||
= JMS - AMQP 1.0 JMS Kamelet Source | ||
|
||
*Provided by: "Apache Software Foundation"* | ||
|
||
*Support Level for this Kamelet is: "Preview"* | ||
|
||
A Kamelet that can consume events from any AMQP 1.0 compliant message broker using the Apache Qpid JMS client | ||
|
||
== Configuration Options | ||
|
||
The following table summarizes the configuration options available for the `jms-amqp-10-source` Kamelet: | ||
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] | ||
|=== | ||
| Property| Name| Description| Type| Default| Example | ||
| *brokerURL {empty}* *| Broker URL| The JMS URL| string| | | ||
| *destinationName {empty}* *| Destination Name| The JMS destination name| string| | | ||
| destinationType| Destination Type| The JMS destination type (i.e.: queue or topic)| string| `"queue"`| | ||
|=== | ||
|
||
NOTE: Fields marked with ({empty}*) are mandatory. | ||
|
||
== Usage | ||
|
||
This section summarizes how the `jms-amqp-10-source` can be used in various contexts. | ||
|
||
=== Knative Source | ||
|
||
The `jms-amqp-10-source` Kamelet can be used as Knative source by binding it to a Knative object. | ||
|
||
.jms-amqp-10-source-binding.yaml | ||
[source,yaml] | ||
---- | ||
apiVersion: camel.apache.org/v1alpha1 | ||
kind: KameletBinding | ||
metadata: | ||
name: jms-amqp-10-source-binding | ||
spec: | ||
source: | ||
ref: | ||
kind: Kamelet | ||
apiVersion: camel.apache.org/v1alpha1 | ||
name: jms-amqp-10-source | ||
properties: | ||
brokerURL: "The Broker URL" | ||
destinationName: "The Destination Name" | ||
sink: | ||
ref: | ||
kind: InMemoryChannel | ||
apiVersion: messaging.knative.dev/v1 | ||
name: mychannel | ||
---- | ||
|
||
Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to. | ||
|
||
Save the `jms-amqp-10-source-binding.yaml` file into your hard drive, then configure it according to your needs. | ||
|
||
You can run the source using the following command: | ||
|
||
[source,shell] | ||
---- | ||
kubectl apply -f jms-amqp-10-source-binding.yaml | ||
---- | ||
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apiVersion: camel.apache.org/v1alpha1 | ||
kind: Kamelet | ||
metadata: | ||
name: jms-amqp-10-source | ||
annotations: | ||
camel.apache.org/kamelet.support.level: "Preview" | ||
camel.apache.org/provider: "Apache Software Foundation" | ||
camel.apache.org/catalog.version: "main-SNAPSHOT" | ||
camel.apache.org/kamelet.group: "JMS" | ||
labels: | ||
camel.apache.org/kamelet.type: "source" | ||
camel.apache.org/requires.runtime: camel-k | ||
spec: | ||
definition: | ||
title: "JMS - AMQP 1.0 JMS Kamelet Source" | ||
description: "A Kamelet that can consume events from any AMQP 1.0 compliant message broker using the Apache Qpid JMS client" | ||
required: | ||
- destinationName | ||
- brokerURL | ||
type: object | ||
properties: | ||
destinationType: | ||
title: "Destination Type" | ||
description: "The JMS destination type (i.e.: queue or topic)" | ||
type: string | ||
default: queue | ||
destinationName: | ||
title: "Destination Name" | ||
description: "The JMS destination name" | ||
type: string | ||
brokerURL: | ||
title: "Broker URL" | ||
description: "The JMS URL" | ||
type: string | ||
dependencies: | ||
- "camel:jms" | ||
- "camel:kamelet" | ||
- "mvn:org.apache.camel.k:camel-k-kamelet-reify" | ||
- "mvn:org.apache.qpid:qpid-jms-client:jar:1.0.0" | ||
flow: | ||
beans: | ||
- name: connectionFactoryBean | ||
type: "#class:org.apache.qpid.jms.JmsConnectionFactory" | ||
property: | ||
- key: remoteURI | ||
value: '{{remoteURI}}' | ||
from: | ||
uri: "kamelet-reify:jms:{{destinationType}}:{{destinationName}}" | ||
parameters: | ||
connectionFactory: "#bean:{{connectionFactoryBean}}" | ||
steps: | ||
- to: | ||
uri: "kamelet:sink" |