Chapter 39. JMS - AMQP 1.0 Sink
Send data to any AMQP 1.0 compliant message broker by using the Apache Qpid JMS client.
39.1. Configuration Options Copy linkLink copied to clipboard!
The following table summarizes the configuration options available for the jms-amqp-10-sink Kamelet:
| Property | Name | Description | Type | Default | Example |
|---|---|---|---|---|---|
| destinationName * | Destination Name | The JMS destination name. | string | ||
| remoteURI * | Broker URL | The JMS URL. | string | amqp://my-host:31616 | |
| destinationType | Destination Type | The JMS destination type (queue or topic). | string | queue |
* = Fields marked with an asterisk are mandatory.
39.2. Dependencies Copy linkLink copied to clipboard!
39.2.1. Quarkus dependencies Copy linkLink copied to clipboard!
<dependencies>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifact>camel-quarkus-amqp</artifact>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifact>camel-quarkus-jms</artifact>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifact>camel-quarkus-kamelet</artifact>
</dependency>
<dependency>
<groupId>org.apache.camel.kamelets</groupId>
<artifact>camel-kamelets-utils</artifact>
<version>4.8.5</version>
</dependency>
</dependencies>
39.3. Usage Copy linkLink copied to clipboard!
39.3.1. Camel JBang usage Copy linkLink copied to clipboard!
39.3.1.1. Prerequisites for JBang Copy linkLink copied to clipboard!
- Install JBang.
You have executed the following command:
jbang app install camel@apache/camel
39.3.1.2. Running a route with JBang Copy linkLink copied to clipboard!
Suppose 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 now run it directly through the following command.
camel run route.yaml
39.3.2. Knative Sink Copy linkLink copied to clipboard!
You can use the jms-amqp-10-sink Kamelet as a Knative sink by binding it to a Knative object.
jms-amqp-10-sink-binding.yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: jms-amqp-10-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: jms-amqp-10-sink
properties:
destinationName: "The Destination Name"
remoteURI: "amqp://my-host:31616"
39.3.3. Kafka Sink Copy linkLink copied to clipboard!
You can use the jms-amqp-10-sink Kamelet as a Kafka sink by binding it to a Kafka topic.
jms-amqp-10-sink-binding.yaml
apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
name: jms-amqp-10-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: jms-amqp-10-sink
properties:
destinationName: "The Destination Name"
remoteURI: "amqp://my-host:31616"