This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 06fd4c631 chore: the JMS sources take a durable subscription and a
message selector (#3170) (#3179)
06fd4c631 is described below
commit 06fd4c631bdda7a8ec8c710caa84f3ed0c6e133e
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Nov 18 09:58:09 2026 +0100
chore: the JMS sources take a durable subscription and a message selector
(#3170) (#3179)
jms-apache-artemis-source, jms-amqp-10-source and jms-ibm-mq-source take
subscriptionDurable, subscriptionShared, subscriptionName and selector, and
the Artemis and AMQP 1.0 sources take clientId (the IBM MQ source already
had it, on its connection factory). A topic subscriber can now keep the
messages sent while it is down. With the new options unset, the sources
behave as before: subscriptionDurable and subscriptionShared default to
false, as in camel-jms, and the other options are left out of the endpoint.
Checked with Camel JBang 4.24.0-SNAPSHOT against Artemis (core and AMQP)
and IBM MQ: a durable subscription receives the messages sent while the
source was stopped, without the options they are lost, and a selector
receives only the matching messages from a queue.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../partials/jms-amqp-10-source-description.adoc | 42 +++++++++++++++
.../jms-apache-artemis-source-description.adoc | 62 ++++++++++++++++++++--
.../partials/jms-ibm-mq-source-description.adoc | 45 ++++++++++++++++
kamelets/jms-amqp-10-source.kamelet.yaml | 32 ++++++++++-
kamelets/jms-apache-artemis-source.kamelet.yaml | 32 ++++++++++-
kamelets/jms-ibm-mq-source.kamelet.yaml | 29 +++++++++-
.../main/resources/META-INF/kamelets-index.json | 6 +--
.../kamelets/jms-amqp-10-source.kamelet.yaml | 32 ++++++++++-
.../jms-apache-artemis-source.kamelet.yaml | 32 ++++++++++-
.../kamelets/jms-ibm-mq-source.kamelet.yaml | 29 +++++++++-
10 files changed, 327 insertions(+), 14 deletions(-)
diff --git a/docs/modules/ROOT/partials/jms-amqp-10-source-description.adoc
b/docs/modules/ROOT/partials/jms-amqp-10-source-description.adoc
index f4a0dc2f6..ad9e1091b 100644
--- a/docs/modules/ROOT/partials/jms-amqp-10-source-description.adoc
+++ b/docs/modules/ROOT/partials/jms-amqp-10-source-description.adoc
@@ -21,6 +21,9 @@ The Kamelet requires connection parameters for the AMQP 1.0
broker:
- `remoteURI`: the address of the broker, with the login when the broker needs
one
- `destinationName`: the name of the queue or topic
- `destinationType`: `queue` (the default) or `topic`
+- `subscriptionDurable`, `subscriptionShared`, `subscriptionName` and
`clientId`: a durable or shared subscription to
+ a topic (see below)
+- `selector`: receive only the messages that match a condition on their
properties and headers
=== Usage example
@@ -36,3 +39,42 @@ The Kamelet requires connection parameters for the AMQP 1.0
broker:
- to:
uri: "kamelet:log-sink"
----
+
+=== Durable topic subscription
+
+From a topic, the source receives by default only the messages published while
it is connected. With
+`subscriptionDurable` set to `true`, the broker keeps the messages published
while the source is stopped, and delivers
+them when it starts again. The broker keeps the subscription under the client
ID and the subscription name, so use the
+same `clientId` and `subscriptionName` each time the source starts.
+
+[source,yaml,subs='+attributes,macros']
+----
+- route:
+ from:
+ uri: "kamelet:jms-amqp-10-source"
+ parameters:
+ remoteURI:
"amqp://broker.example.com:5672?jms.username=app&jms.password=secret"
+ destinationName: "events"
+ destinationType: "topic"
+ subscriptionDurable: true
+ subscriptionName: "audit"
+ clientId: "audit-service"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+----
+
+The JMS rules to know:
+
+- A durable subscription that is not shared needs a `clientId`. Without one,
the source starts but receives nothing,
+ and logs that a client ID must be set.
+- Only one connection may use a client ID at a time: two running copies of the
source need different client IDs.
+- To run several copies of the source on one durable subscription, set
`subscriptionShared` to `true` as well, and
+ leave `clientId` empty: the copies share the messages of the topic by
`subscriptionName`, each message going to one
+ of them. Shared subscriptions are part of JMS 2.0.
+- The durable subscription stays on the broker, and keeps collecting messages,
until it is removed in the broker.
+
+=== Message selector
+
+With `selector`, the source receives only the messages that match it, a
condition on the JMS properties and headers of
+the message, such as `priority > 5`. From a queue, the other messages stay on
the queue.
diff --git
a/docs/modules/ROOT/partials/jms-apache-artemis-source-description.adoc
b/docs/modules/ROOT/partials/jms-apache-artemis-source-description.adoc
index 6c873d33c..f936a35d7 100644
--- a/docs/modules/ROOT/partials/jms-apache-artemis-source-description.adoc
+++ b/docs/modules/ROOT/partials/jms-apache-artemis-source-description.adoc
@@ -13,8 +13,9 @@ The JMS Apache Artemis Source Kamelet supports the following
configurations:
- **Destination Name**: JMS destination (queue or topic) name (required)
- **Destination Type**: Type of destination - queue or topic (default: queue)
- **Username** and **Password**: the login to the broker, when it needs one
-
-The subscription to a topic is not durable, and the Kamelet has no option for
a message selector.
+- **Durable Subscription**, **Shared Subscription**, **Subscription Name** and
**Client ID**: a durable or shared
+ subscription to a topic (see below)
+- **Message Selector**: receive only the messages that match a condition on
their properties and headers
=== Output Format
@@ -39,7 +40,29 @@ message, bytes for a bytes message, and a Map for a map
message.
=== Example with Topic Subscription
-The source receives only the messages published to the topic while it is
connected.
+By default, the source receives only the messages published to the topic while
it is connected.
+
+[source,yaml,subs='+attributes,macros']
+----
+- route:
+ from:
+ uri: "kamelet:jms-apache-artemis-source"
+ parameters:
+ brokerURL: "tcp://artemis.example.com:61616"
+ username: "artemisuser"
+ password: "artemispass"
+ destinationName: "events.topic"
+ destinationType: "topic"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+----
+
+=== Example with a Durable Topic Subscription
+
+With `subscriptionDurable` set to `true`, the broker keeps the messages
published to the topic while the source is
+stopped, and delivers them when it starts again. The broker keeps the
subscription under the client ID and the
+subscription name, so use the same `clientId` and `subscriptionName` each time
the source starts.
[source,yaml,subs='+attributes,macros']
----
@@ -52,6 +75,39 @@ The source receives only the messages published to the topic
while it is connect
password: "artemispass"
destinationName: "events.topic"
destinationType: "topic"
+ subscriptionDurable: true
+ subscriptionName: "audit"
+ clientId: "audit-service"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+----
+
+The JMS rules to know:
+
+- A durable subscription that is not shared needs a `clientId`. Without one,
the source starts but receives nothing,
+ and logs that the client ID is not set.
+- Only one connection may use a client ID at a time. A second copy of the
source with the same `clientId` receives
+ nothing, and logs that the client ID is already in use.
+- To run several copies of the source on one durable subscription, set
`subscriptionShared` to `true` as well, and
+ leave `clientId` empty: the copies share the messages of the topic by
`subscriptionName`, each message going to one
+ of them. Shared subscriptions are part of JMS 2.0.
+- The durable subscription stays on the broker, and keeps collecting messages,
until it is removed in the broker.
+
+=== Example with a Message Selector
+
+The source receives only the messages that match `selector`, a condition on
the JMS properties and headers of the
+message. From a queue, the other messages stay on the queue.
+
+[source,yaml,subs='+attributes,macros']
+----
+- route:
+ from:
+ uri: "kamelet:jms-apache-artemis-source"
+ parameters:
+ brokerURL: "tcp://artemis.example.com:61616"
+ destinationName: "orders.queue"
+ selector: "priority > 5"
steps:
- to:
uri: "kamelet:log-sink"
diff --git a/docs/modules/ROOT/partials/jms-ibm-mq-source-description.adoc
b/docs/modules/ROOT/partials/jms-ibm-mq-source-description.adoc
index cc4232f8c..80e028f11 100644
--- a/docs/modules/ROOT/partials/jms-ibm-mq-source-description.adoc
+++ b/docs/modules/ROOT/partials/jms-ibm-mq-source-description.adoc
@@ -47,3 +47,48 @@ The Kamelet requires IBM MQ specific connection parameters:
- to:
uri: "kamelet:log-sink"
----
+
+=== Durable topic subscription
+
+From a topic, the source receives by default only the messages published while
it is connected. With
+`subscriptionDurable` set to `true`, the queue manager keeps the messages
published while the source is stopped, and
+delivers them when it starts again. The queue manager keeps the subscription
under the client ID and the subscription
+name, so use the same `clientId` and `subscriptionName` each time the source
starts. The user `username` needs the
+authority to subscribe to the topic.
+
+[source,yaml,subs='+attributes,macros']
+----
+- route:
+ from:
+ uri: "kamelet:jms-ibm-mq-source"
+ parameters:
+ serverName: "mq.example.com"
+ serverPort: 1414
+ queueManager: "QM1"
+ channel: "DEV.APP.SVRCONN"
+ username: "app"
+ password: "passw0rd"
+ destinationType: "topic"
+ destinationName: "orders/events"
+ subscriptionDurable: true
+ subscriptionName: "audit"
+ clientId: "audit-service"
+ steps:
+ - to:
+ uri: "kamelet:log-sink"
+----
+
+The JMS rules to know:
+
+- A durable subscription that is not shared needs a `clientId`.
+- Only one connection may use a client ID at a time: two running copies of the
source need different client IDs.
+- To run several copies of the source on one durable subscription, set
`subscriptionShared` to `true` as well, and
+ leave `clientId` empty: the copies share the messages of the topic by
`subscriptionName`, each message going to one
+ of them. Shared subscriptions are part of JMS 2.0.
+- The durable subscription stays on the queue manager, and keeps collecting
messages, until it is removed in the
+ queue manager.
+
+=== Message selector
+
+With `selector`, the source receives only the messages that match it, a
condition on the JMS properties and headers of
+the message, such as `priority > 5`. From a queue, the other messages stay on
the queue.
diff --git a/kamelets/jms-amqp-10-source.kamelet.yaml
b/kamelets/jms-amqp-10-source.kamelet.yaml
index dea317a71..aafff383e 100644
--- a/kamelets/jms-amqp-10-source.kamelet.yaml
+++ b/kamelets/jms-amqp-10-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, bytes for a bytes
message, and a Map for a map message. The JMS properties of the message become
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`,
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
- Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, as the subscription is
not durable. The login and the TLS settings go in `remoteURI`: there are no
separate options for them. When the broker cannot be reached, it starts anyway
and tries again every 5 seconds.
+ Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, unless
`subscriptionDurable` is true: then the broker keeps the messages sent while it
is stopped, under `subscriptionName`. A durable subscription needs `clientId`
unless it is shared (`subscriptionShared`, J [...]
required:
- destinationName
- remoteURI
@@ -59,6 +59,31 @@ spec:
description: "The address of the broker, as `amqp://host:port` (the
AMQP port is usually 5672), or `amqps://host:port` for TLS. Settings of the
Qpid JMS client go after `?`: `jms.username` and `jms.password` for a login, as
`amqp://host:5672?jms.username=app&jms.password=secret`, and
`transport.trustStoreLocation`, `transport.trustStorePassword`,
`transport.keyStoreLocation` and `transport.keyStorePassword` for TLS."
type: string
example: "amqp://localhost:5672"
+ clientId:
+ title: "Client ID"
+ description: "The JMS client ID of the connection, which names this
application to the broker. A durable subscription that is not shared needs one:
the broker keeps the subscription under the client ID and `subscriptionName`,
so use the same client ID each time the source starts. Only one connection may
use a client ID at a time: two running copies of this source need different
client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
+ type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the broker keeps the messages sent to the topic while this source is
stopped or disconnected, and delivers them when it connects again; the broker
keeps the subscription, and collects messages for it, until it is removed in
the broker. Set `subscriptionName` with it, and `clientId` unless
`subscriptionShared` is true. When it is false, the messages sent while the
source is not connected are lost. Only [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs a broker that supports JMS 2.0. Only for a topic: true makes
`destinationName` a topic, even with `destin [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the broker keeps the subscription. Use the same name each
time the source starts, to receive the messages kept while it was stopped. Set
it whenever `subscriptionDurable` or `subscriptionShared` is true: without it,
every source takes the same default name, so two sources with the same client
ID, or two shared sources, take over one another's subscription. Not used
otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -93,6 +118,11 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
+ clientId: "{{?clientId}}"
connectionFactory: "#bean:{{connectionFactoryBean}}"
steps:
- to:
diff --git a/kamelets/jms-apache-artemis-source.kamelet.yaml
b/kamelets/jms-apache-artemis-source.kamelet.yaml
index 7bcbcc005..5f59b65e2 100644
--- a/kamelets/jms-apache-artemis-source.kamelet.yaml
+++ b/kamelets/jms-apache-artemis-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, bytes for a bytes
message, and a Map for a map message. The JMS properties of the message become
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`,
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
- Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, as the subscription is
not durable. It connects with no TLS unless `brokerURL` asks for it, and logs
in with `username` and `password` when they are set. When the broker cannot be
reached, it starts anyway and [...]
+ Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, unless
`subscriptionDurable` is true: then the broker keeps the messages sent while it
is stopped, under `subscriptionName`. A durable subscription needs `clientId`
unless it is shared (`subscriptionShared`, J [...]
required:
- destinationName
- brokerURL
@@ -72,6 +72,31 @@ spec:
format: password
x-descriptors:
- urn:camel:group:credentials
+ clientId:
+ title: "Client ID"
+ description: "The JMS client ID of the connection, which names this
application to the broker. A durable subscription that is not shared needs one:
the broker keeps the subscription under the client ID and `subscriptionName`,
so use the same client ID each time the source starts. Only one connection may
use a client ID at a time: two running copies of this source need different
client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
+ type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the broker keeps the messages sent to the topic while this source is
stopped or disconnected, and delivers them when it connects again; the broker
keeps the subscription, and collects messages for it, until it is removed in
the broker. Set `subscriptionName` with it, and `clientId` unless
`subscriptionShared` is true. When it is false, the messages sent while the
source is not connected are lost. Only [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs a broker that supports JMS 2.0. Only for a topic: true makes
`destinationName` a topic, even with `destin [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the broker keeps the subscription. Use the same name each
time the source starts, to receive the messages kept while it was stopped. Set
it whenever `subscriptionDurable` or `subscriptionShared` is true: without it,
every source takes the same default name, so two sources with the same client
ID, or two shared sources, take over one another's subscription. Not used
otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -108,6 +133,11 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
+ clientId: "{{?clientId}}"
connectionFactory: "#bean:{{connectionFactoryBean}}"
steps:
- to:
diff --git a/kamelets/jms-ibm-mq-source.kamelet.yaml
b/kamelets/jms-ibm-mq-source.kamelet.yaml
index ce361c65d..7f0807ab2 100644
--- a/kamelets/jms-ibm-mq-source.kamelet.yaml
+++ b/kamelets/jms-ibm-mq-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, and bytes for a bytes
message. The JMS properties of the message become headers, along with the JMS
headers such as `JMSMessageID` and `JMSTimestamp`, and IBM MQ details such as
`JMSXUserID`, `JMS_IBM_PutDate` and `JMS_IBM_Format`.
- Good to know: the IBM MQ client library is not included, as its licence
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a
version to the dependencies of the integration (Camel JBang adds it by itself).
From a queue, each message is removed when it is received, even when the rest
of the flow then fails, and several copies of this source share the messages.
From a topic (`destinationType` set to `topic`), it receives only the messages
sent while it is conne [...]
+ Good to know: the IBM MQ client library is not included, as its licence
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a
version to the dependencies of the integration (Camel JBang adds it by itself).
From a queue, each message is removed when it is received, even when the rest
of the flow then fails, and several copies of this source share the messages.
From a topic (`destinationType` set to `topic`), it receives only the messages
sent while it is conne [...]
required:
- serverName
- serverPort
@@ -81,7 +81,8 @@ spec:
type: string
clientId:
title: "Client ID"
- description: "An optional JMS client ID for the connection, which
names this application to the queue manager. Leave it empty unless your IBM MQ
administrator asks for one."
+ description: "The JMS client ID of the connection, which names this
application to the queue manager. A durable subscription that is not shared
needs one: the queue manager keeps the subscription under the client ID and
`subscriptionName`, so use the same client ID each time the source starts. Only
one connection may use a client ID at a time: two running copies of this source
need different client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
type: string
username:
title: "Username"
@@ -99,6 +100,26 @@ spec:
description: "The TLS cipher suite to connect with, which must match
the cipher spec of the channel on the queue manager. When it is set, the
connection uses TLS; when it is not set, it does not."
example: "TLS_RSA_WITH_AES_128_CBC_SHA256"
type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the queue manager keeps the messages sent to the topic while this
source is stopped or disconnected, and delivers them when it connects again;
the queue manager keeps the subscription, and collects messages for it, until
it is removed in the queue manager. Set `subscriptionName` with it, and
`clientId` unless `subscriptionShared` is true. When it is false, the messages
sent while the source is not conn [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs IBM MQ 8 or later (JMS 2.0). Only for a topic: true makes
`destinationName` a topic, even with `destinati [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the queue manager keeps the subscription. Use the same name
each time the source starts, to receive the messages kept while it was stopped.
Set it whenever `subscriptionDurable` or `subscriptionShared` is true: without
it, every source takes the same default name, so two sources with the same
client ID, or two shared sources, take over one another's subscription. Not
used otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -140,6 +161,10 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
connectionFactory: "#bean:{{wmqConnectionFactory}}"
steps:
- to:
diff --git
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index 8aa0b94ea..be81cbd1d 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -1215,7 +1215,7 @@
"supportLevel" : "Stable",
"title" : "JMS - AMQP 1.0 Source",
"summary" : "Receives each message from a queue or a topic in a message
broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through JMS and
the Apache Qpid client.",
- "description" : "Receives each message from a queue or a topic in a
message broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through
JMS and the Apache Qpid client.\n\nUse it to process work that other
applications put on a queue, or to react to events published on a topic, on any
broker that supports the AMQP 1.0 protocol. For an Artemis broker,
`jms-apache-artemis-source` works too.\n\nOutput: the body is text for a JMS
text message, bytes for a bytes message, and a Ma [...]
+ "description" : "Receives each message from a queue or a topic in a
message broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through
JMS and the Apache Qpid client.\n\nUse it to process work that other
applications put on a queue, or to react to events published on a topic, on any
broker that supports the AMQP 1.0 protocol. For an Artemis broker,
`jms-apache-artemis-source` works too.\n\nOutput: the body is text for a JMS
text message, bytes for a bytes message, and a Ma [...]
"group" : "JMS",
"namespace" : "Messaging",
"provider" : "Apache Software Foundation"
@@ -1235,7 +1235,7 @@
"supportLevel" : "Stable",
"title" : "JMS - Apache Artemis Source",
"summary" : "Receives each message from a queue or a topic in an Apache
ActiveMQ Artemis broker, through JMS.",
- "description" : "Receives each message from a queue or a topic in an
Apache ActiveMQ Artemis broker, through JMS.\n\nUse it to process work that
other applications put on a queue, such as orders or jobs, or to react to
events published on a topic. For another broker that speaks AMQP 1.0, use
`jms-amqp-10-source`.\n\nOutput: the body is text for a JMS text message, bytes
for a bytes message, and a Map for a map message. The JMS properties of the
message become headers, along with the [...]
+ "description" : "Receives each message from a queue or a topic in an
Apache ActiveMQ Artemis broker, through JMS.\n\nUse it to process work that
other applications put on a queue, such as orders or jobs, or to react to
events published on a topic. For another broker that speaks AMQP 1.0, use
`jms-amqp-10-source`.\n\nOutput: the body is text for a JMS text message, bytes
for a bytes message, and a Map for a map message. The JMS properties of the
message become headers, along with the [...]
"group" : "JMS",
"namespace" : "Messaging",
"provider" : "Apache Software Foundation"
@@ -1255,7 +1255,7 @@
"supportLevel" : "Stable",
"title" : "JMS - IBM MQ Source",
"summary" : "Receives each message from a queue or a topic of an IBM MQ
queue manager, through JMS.",
- "description" : "Receives each message from a queue or a topic of an IBM
MQ queue manager, through JMS.\n\nUse it to process work or events that other
applications put on IBM MQ, such as an existing enterprise or mainframe system.
Use `jms-ibm-mq-sink` to send to IBM MQ.\n\nOutput: the body is text for a JMS
text message, and bytes for a bytes message. The JMS properties of the message
become headers, along with the JMS headers such as `JMSMessageID` and
`JMSTimestamp`, and IBM MQ de [...]
+ "description" : "Receives each message from a queue or a topic of an IBM
MQ queue manager, through JMS.\n\nUse it to process work or events that other
applications put on IBM MQ, such as an existing enterprise or mainframe system.
Use `jms-ibm-mq-sink` to send to IBM MQ.\n\nOutput: the body is text for a JMS
text message, and bytes for a bytes message. The JMS properties of the message
become headers, along with the JMS headers such as `JMSMessageID` and
`JMSTimestamp`, and IBM MQ de [...]
"group" : "JMS",
"namespace" : "Messaging",
"provider" : "Apache Software Foundation"
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
index dea317a71..aafff383e 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, bytes for a bytes
message, and a Map for a map message. The JMS properties of the message become
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`,
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
- Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, as the subscription is
not durable. The login and the TLS settings go in `remoteURI`: there are no
separate options for them. When the broker cannot be reached, it starts anyway
and tries again every 5 seconds.
+ Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, unless
`subscriptionDurable` is true: then the broker keeps the messages sent while it
is stopped, under `subscriptionName`. A durable subscription needs `clientId`
unless it is shared (`subscriptionShared`, J [...]
required:
- destinationName
- remoteURI
@@ -59,6 +59,31 @@ spec:
description: "The address of the broker, as `amqp://host:port` (the
AMQP port is usually 5672), or `amqps://host:port` for TLS. Settings of the
Qpid JMS client go after `?`: `jms.username` and `jms.password` for a login, as
`amqp://host:5672?jms.username=app&jms.password=secret`, and
`transport.trustStoreLocation`, `transport.trustStorePassword`,
`transport.keyStoreLocation` and `transport.keyStorePassword` for TLS."
type: string
example: "amqp://localhost:5672"
+ clientId:
+ title: "Client ID"
+ description: "The JMS client ID of the connection, which names this
application to the broker. A durable subscription that is not shared needs one:
the broker keeps the subscription under the client ID and `subscriptionName`,
so use the same client ID each time the source starts. Only one connection may
use a client ID at a time: two running copies of this source need different
client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
+ type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the broker keeps the messages sent to the topic while this source is
stopped or disconnected, and delivers them when it connects again; the broker
keeps the subscription, and collects messages for it, until it is removed in
the broker. Set `subscriptionName` with it, and `clientId` unless
`subscriptionShared` is true. When it is false, the messages sent while the
source is not connected are lost. Only [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs a broker that supports JMS 2.0. Only for a topic: true makes
`destinationName` a topic, even with `destin [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the broker keeps the subscription. Use the same name each
time the source starts, to receive the messages kept while it was stopped. Set
it whenever `subscriptionDurable` or `subscriptionShared` is true: without it,
every source takes the same default name, so two sources with the same client
ID, or two shared sources, take over one another's subscription. Not used
otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -93,6 +118,11 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
+ clientId: "{{?clientId}}"
connectionFactory: "#bean:{{connectionFactoryBean}}"
steps:
- to:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
index 7bcbcc005..5f59b65e2 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, bytes for a bytes
message, and a Map for a map message. The JMS properties of the message become
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`,
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
- Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, as the subscription is
not durable. It connects with no TLS unless `brokerURL` asks for it, and logs
in with `username` and `password` when they are set. When the broker cannot be
reached, it starts anyway and [...]
+ Good to know: From a queue, each message is removed when it is received,
even when the rest of the flow then fails, and several copies of this source
share the messages. From a topic (`destinationType` set to `topic`), it
receives only the messages sent while it is connected, unless
`subscriptionDurable` is true: then the broker keeps the messages sent while it
is stopped, under `subscriptionName`. A durable subscription needs `clientId`
unless it is shared (`subscriptionShared`, J [...]
required:
- destinationName
- brokerURL
@@ -72,6 +72,31 @@ spec:
format: password
x-descriptors:
- urn:camel:group:credentials
+ clientId:
+ title: "Client ID"
+ description: "The JMS client ID of the connection, which names this
application to the broker. A durable subscription that is not shared needs one:
the broker keeps the subscription under the client ID and `subscriptionName`,
so use the same client ID each time the source starts. Only one connection may
use a client ID at a time: two running copies of this source need different
client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
+ type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the broker keeps the messages sent to the topic while this source is
stopped or disconnected, and delivers them when it connects again; the broker
keeps the subscription, and collects messages for it, until it is removed in
the broker. Set `subscriptionName` with it, and `clientId` unless
`subscriptionShared` is true. When it is false, the messages sent while the
source is not connected are lost. Only [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs a broker that supports JMS 2.0. Only for a topic: true makes
`destinationName` a topic, even with `destin [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the broker keeps the subscription. Use the same name each
time the source starts, to receive the messages kept while it was stopped. Set
it whenever `subscriptionDurable` or `subscriptionShared` is true: without it,
every source takes the same default name, so two sources with the same client
ID, or two shared sources, take over one another's subscription. Not used
otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -108,6 +133,11 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
+ clientId: "{{?clientId}}"
connectionFactory: "#bean:{{connectionFactoryBean}}"
steps:
- to:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
index ce361c65d..7f0807ab2 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Output: the body is text for a JMS text message, and bytes for a bytes
message. The JMS properties of the message become headers, along with the JMS
headers such as `JMSMessageID` and `JMSTimestamp`, and IBM MQ details such as
`JMSXUserID`, `JMS_IBM_PutDate` and `JMS_IBM_Format`.
- Good to know: the IBM MQ client library is not included, as its licence
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a
version to the dependencies of the integration (Camel JBang adds it by itself).
From a queue, each message is removed when it is received, even when the rest
of the flow then fails, and several copies of this source share the messages.
From a topic (`destinationType` set to `topic`), it receives only the messages
sent while it is conne [...]
+ Good to know: the IBM MQ client library is not included, as its licence
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a
version to the dependencies of the integration (Camel JBang adds it by itself).
From a queue, each message is removed when it is received, even when the rest
of the flow then fails, and several copies of this source share the messages.
From a topic (`destinationType` set to `topic`), it receives only the messages
sent while it is conne [...]
required:
- serverName
- serverPort
@@ -81,7 +81,8 @@ spec:
type: string
clientId:
title: "Client ID"
- description: "An optional JMS client ID for the connection, which
names this application to the queue manager. Leave it empty unless your IBM MQ
administrator asks for one."
+ description: "The JMS client ID of the connection, which names this
application to the queue manager. A durable subscription that is not shared
needs one: the queue manager keeps the subscription under the client ID and
`subscriptionName`, so use the same client ID each time the source starts. Only
one connection may use a client ID at a time: two running copies of this source
need different client IDs. When it is not set, the connection has no client ID."
+ example: "orders-service"
type: string
username:
title: "Username"
@@ -99,6 +100,26 @@ spec:
description: "The TLS cipher suite to connect with, which must match
the cipher spec of the channel on the queue manager. When it is set, the
connection uses TLS; when it is not set, it does not."
example: "TLS_RSA_WITH_AES_128_CBC_SHA256"
type: string
+ subscriptionDurable:
+ title: "Durable Subscription"
+ description: "Whether the subscription to a topic is durable. When it
is true, the queue manager keeps the messages sent to the topic while this
source is stopped or disconnected, and delivers them when it connects again;
the queue manager keeps the subscription, and collects messages for it, until
it is removed in the queue manager. Set `subscriptionName` with it, and
`clientId` unless `subscriptionShared` is true. When it is false, the messages
sent while the source is not conn [...]
+ type: boolean
+ default: false
+ subscriptionShared:
+ title: "Shared Subscription"
+ description: "Whether the subscription to a topic is shared: the
copies of this source that use the same `subscriptionName` share the messages
of the topic, each message going to one of them, instead of each copy receiving
every message. A shared subscription needs no `clientId`. Combine it with
`subscriptionDurable` for a durable subscription that several copies share.
Needs IBM MQ 8 or later (JMS 2.0). Only for a topic: true makes
`destinationName` a topic, even with `destinati [...]
+ type: boolean
+ default: false
+ subscriptionName:
+ title: "Subscription Name"
+ description: "The name of the durable or shared subscription to a
topic, under which the queue manager keeps the subscription. Use the same name
each time the source starts, to receive the messages kept while it was stopped.
Set it whenever `subscriptionDurable` or `subscriptionShared` is true: without
it, every source takes the same default name, so two sources with the same
client ID, or two shared sources, take over one another's subscription. Not
used otherwise."
+ example: "orders-audit"
+ type: string
+ selector:
+ title: "Message Selector"
+ description: "A JMS message selector: the source receives only the
messages that match it. It is a condition, in a syntax like the WHERE clause of
SQL, on the JMS properties and headers of the message, not on its body, such as
`priority > 5` or `region = 'EU' AND JMSPriority >= 7`. From a queue, the
messages that do not match stay on the queue. When it is not set, the source
receives every message."
+ example: "priority > 5"
+ type: string
dataTypes:
out:
headers:
@@ -140,6 +161,10 @@ spec:
parameters:
destinationType: "{{destinationType}}"
destinationName: "{{destinationName}}"
+ subscriptionDurable: "{{subscriptionDurable}}"
+ subscriptionShared: "{{subscriptionShared}}"
+ subscriptionName: "{{?subscriptionName}}"
+ selector: "{{?selector}}"
connectionFactory: "#bean:{{wmqConnectionFactory}}"
steps:
- to: