This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e308bd043fc3 CAMEL-27628: camel-iggy - stream of the override header
with streamId, partitioning as text, labels (#31010)
e308bd043fc3 is described below
commit e308bd043fc32e246217e15f90ea3d955453d5e4
Author: allthingssecurity <[email protected]>
AuthorDate: Sat Nov 28 03:21:52 2026 +0530
CAMEL-27628: camel-iggy - stream of the override header with streamId,
partitioning as text, labels (#31010)
1. With streamId set, IggyEndpoint.initializeTopic() looked up the stream by
streamId and created the stream of the endpoint even for the stream of a
CamelIggyStreamOverride header, so that stream was never created and the
exchange failed. streamId is now used only for the stream of the
endpoint; the stream of the header is looked up and created by its name.
2. The consumer logged getStreamId() as the stream, which is null when only
streamName is set. It now logs streamName. streamId keeps what it does
for the stream of the endpoint (the stream that autoCreateStream looks
up,
as CAMEL-23832 documents it): the Iggy Java client 0.9.0 has only
createStream(String), so a created stream cannot get that ID.
3. consumersCount created a thread pool of that size, but the consumer
submits one polling task. Polling with several tasks needs a design for
the offset that each task keeps without autoCommit, so the option is
deprecated, and its behaviour is unchanged.
4. There was no type converter from String to Partitioning, so
partitioning=balanced in a URI failed to bind. The new IggyConverters
converts balanced, partitionId:<partition id> and messagesKey:<key>.
5. password has the label security, as username has.
6. shutdownTimeout is read by the consumer only, so its label is consumer
instead of common,consumer.
Regenerated iggy.json (component and catalog copy), the converter loader,
and the endpoint and component DSL. Upgrade guide entry for 4.24.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../org/apache/camel/catalog/components/iggy.json | 70 ++++-----
.../camel/component/iggy/IggyConvertersLoader.java | 60 ++++++++
.../org/apache/camel/component/iggy/iggy.json | 70 ++++-----
.../services/org/apache/camel/TypeConverterLoader | 2 +
.../camel/component/iggy/IggyConfiguration.java | 27 +++-
.../apache/camel/component/iggy/IggyConstants.java | 4 +-
.../apache/camel/component/iggy/IggyConsumer.java | 4 +-
.../camel/component/iggy/IggyConverters.java | 62 ++++++++
.../apache/camel/component/iggy/IggyEndpoint.java | 3 +-
.../iggy/IggyStreamOverridePartitioningTest.java | 118 ++++++++++++++
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 12 ++
.../component/dsl/IggyComponentBuilderFactory.java | 55 ++++---
.../endpoint/dsl/IggyEndpointBuilderFactory.java | 169 ++++++++++++---------
13 files changed, 478 insertions(+), 178 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/iggy.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/iggy.json
index 1292a1e56e1b..cebf889b0e60 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/iggy.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/iggy.json
@@ -34,22 +34,22 @@
"maxTopicSize": { "index": 7, "kind": "property", "displayName": "Max
Topic Size", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum size in bytes of a topic that
autoCreateTopic creates. With 0 no maximum size is set o [...]
"messageExpiry": { "index": 8, "kind": "property", "displayName": "Message
Expiry", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in seconds after which the server
deletes the messages of a topic that autoCreateTopic c [...]
"partitionsCount": { "index": 9, "kind": "property", "displayName":
"Partitions Count", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of partitions of a topic that
autoCreateTopic creates." },
- "password": { "index": 10, "kind": "property", "displayName": "Password",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the username optio [...]
- "port": { "index": 11, "kind": "property", "displayName": "Port", "group":
"common", "label": "", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 8090,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The port of the Iggy
server. The default 8090 is the default port of the TCP transport of the
server, so set the HTTP port [...]
- "streamId": { "index": 12, "kind": "property", "displayName": "Stream Id",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up: if no stream has this ID, a stream named streamName is created. The produc
[...]
- "streamName": { "index": 13, "kind": "property", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header repl [...]
- "autoCommit": { "index": 14, "kind": "property", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
- "bridgeErrorHandler": { "index": 15, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the lik [...]
- "consumerGroupName": { "index": 16, "kind": "property", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requi [...]
- "consumersCount": { "index": 17, "kind": "property", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of threads of the thread pool of
the consumer. The consumer runs one polling task, s [...]
- "partitionId": { "index": 18, "kind": "property", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
- "pollBatchSize": { "index": 19, "kind": "property", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
- "pollingStrategy": { "index": 20, "kind": "property", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoCo [...]
- "shutdownTimeout": { "index": 21, "kind": "property", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "common,consumer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 30000,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The time in milliseconds
that the consumer waits for its polling thread to finish [...]
- "startingOffset": { "index": 22, "kind": "property", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
- "lazyStartProducer": { "index": 23, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fai [...]
- "partitioning": { "index": 24, "kind": "property", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it s [...]
- "autowiredEnabled": { "index": 25, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
+ "port": { "index": 10, "kind": "property", "displayName": "Port", "group":
"common", "label": "", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 8090,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The port of the Iggy
server. The default 8090 is the default port of the TCP transport of the
server, so set the HTTP port [...]
+ "streamId": { "index": 11, "kind": "property", "displayName": "Stream Id",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up for the stream of the endpoint: if no stream has this ID, a stream named st
[...]
+ "streamName": { "index": 12, "kind": "property", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header repl [...]
+ "autoCommit": { "index": 13, "kind": "property", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
+ "bridgeErrorHandler": { "index": 14, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the lik [...]
+ "consumerGroupName": { "index": 15, "kind": "property", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requi [...]
+ "consumersCount": { "index": 16, "kind": "property", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": true, "deprecationNote":
"The consumer polls the topic with one task, so a value above 1 only adds idle
threads", "autowired": false, "secret": false, "defaultValue": 1,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "des [...]
+ "partitionId": { "index": 17, "kind": "property", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
+ "pollBatchSize": { "index": 18, "kind": "property", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
+ "pollingStrategy": { "index": 19, "kind": "property", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoCo [...]
+ "shutdownTimeout": { "index": 20, "kind": "property", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 30000, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in milliseconds that the consumer
waits for its polling thread to finish when it [...]
+ "startingOffset": { "index": 21, "kind": "property", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
+ "lazyStartProducer": { "index": 22, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fai [...]
+ "partitioning": { "index": 23, "kind": "property", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it s [...]
+ "autowiredEnabled": { "index": 24, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
+ "password": { "index": 25, "kind": "property", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the user [...]
"sslContextParameters": { "index": 26, "kind": "property", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "SSL configuration using an
org.apache.camel.support.jss [...]
"tlsCertificatePath": { "index": 27, "kind": "property", "displayName":
"Tls Certificate Path", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The path to a certificate file in PEM format
that the client trusts for the TLS connection to [...]
"tlsEnabled": { "index": 28, "kind": "property", "displayName": "Tls
Enabled", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the client connects to the Iggy server
over TLS." },
@@ -65,7 +65,7 @@
"CamelIggyMessageLength": { "index": 5, "kind": "header", "displayName":
"", "group": "consumer", "label": "consumer", "required": false, "javaType":
"Long", "deprecated": false, "autowired": false, "secret": false,
"description": "The length of the payload of the message, in bytes.",
"constantName": "org.apache.camel.component.iggy.IggyConstants#MESSAGE_LENGTH"
},
"CamelIggyMessageSize": { "index": 6, "kind": "header", "displayName": "",
"group": "consumer", "label": "consumer", "required": false, "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "description": "The
size of the message in bytes: the header, the payload and the user headers.",
"constantName": "org.apache.camel.component.iggy.IggyConstants#MESSAGE_SIZE" },
"CamelIggyTopicOverride": { "index": 7, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the topic to send to, instead of the topic of the
endpoint. The producer creates the topic if it does not exist and
autoCreateTopic is true.", "constantName":
"org.apache.camel.component.iggy.IggyConstants#TOPIC_OVERRIDE" },
- "CamelIggyStreamOverride": { "index": 8, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the stream to send to, instead of the streamName of
the endpoint. The producer creates the stream if it does not exist, when
autoCreateStream is true and streamId is not set.", "constantName":
"org.apache.camel.component.iggy.IggyConstants#S [...]
+ "CamelIggyStreamOverride": { "index": 8, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the stream to send to, instead of the streamName of
the endpoint. The producer creates the stream if it does not exist, when
autoCreateStream is true; streamId is used only for the stream of the
endpoint.", "constantName": "org.apache.camel. [...]
},
"bodyTypes": {
"consumerOut": { "carriers": [ "bytes" ], "javaType": "byte[]",
"description": "The payload of the Iggy message as a byte array: convert or
unmarshal it" },
@@ -83,24 +83,24 @@
"maxTopicSize": { "index": 7, "kind": "parameter", "displayName": "Max
Topic Size", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum size in bytes of a topic that
autoCreateTopic creates. With 0 no maximum size is set [...]
"messageExpiry": { "index": 8, "kind": "parameter", "displayName":
"Message Expiry", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in seconds after which the server
deletes the messages of a topic that autoCreateTopic [...]
"partitionsCount": { "index": 9, "kind": "parameter", "displayName":
"Partitions Count", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of partitions of a topic that
autoCreateTopic creates." },
- "password": { "index": 10, "kind": "parameter", "displayName": "Password",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the username opti [...]
- "port": { "index": 11, "kind": "parameter", "displayName": "Port",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 8090, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The port of the Iggy server. The default 8090
is the default port of the TCP transport of the server, so set the HTTP port
[...]
- "streamId": { "index": 12, "kind": "parameter", "displayName": "Stream
Id", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up: if no stream has this ID, a stream named streamName is created. The produ
[...]
- "streamName": { "index": 13, "kind": "parameter", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header rep [...]
- "autoCommit": { "index": 14, "kind": "parameter", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
- "consumerGroupName": { "index": 15, "kind": "parameter", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requ [...]
- "consumersCount": { "index": 16, "kind": "parameter", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of threads of the thread pool of
the consumer. The consumer runs one polling task, [...]
- "partitionId": { "index": 17, "kind": "parameter", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
- "pollBatchSize": { "index": 18, "kind": "parameter", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
- "pollingStrategy": { "index": 19, "kind": "parameter", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoC [...]
- "shutdownTimeout": { "index": 20, "kind": "parameter", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "common,consumer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 30000,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The time in milliseconds
that the consumer waits for its polling thread to finish [...]
- "startingOffset": { "index": 21, "kind": "parameter", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
- "bridgeErrorHandler": { "index": 22, "kind": "parameter", "displayName":
"Bridge Error Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions (if possible) occurred
while the Camel consumer is trying to pickup incoming [...]
- "exceptionHandler": { "index": 23, "kind": "parameter", "displayName":
"Exception Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By de [...]
- "exchangePattern": { "index": 24, "kind": "parameter", "displayName":
"Exchange Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "enum", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ],
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
- "partitioning": { "index": 25, "kind": "parameter", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it [...]
- "lazyStartProducer": { "index": 26, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "headerFilterStrategy": { "index": 27, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter the user headers of a consumed Iggy message before the consumer sets
them as Camel headers. The producer does not send Camel headers." },
+ "port": { "index": 10, "kind": "parameter", "displayName": "Port",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 8090, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The port of the Iggy server. The default 8090
is the default port of the TCP transport of the server, so set the HTTP port
[...]
+ "streamId": { "index": 11, "kind": "parameter", "displayName": "Stream
Id", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up for the stream of the endpoint: if no stream has this ID, a stream named s
[...]
+ "streamName": { "index": 12, "kind": "parameter", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header rep [...]
+ "autoCommit": { "index": 13, "kind": "parameter", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
+ "consumerGroupName": { "index": 14, "kind": "parameter", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requ [...]
+ "consumersCount": { "index": 15, "kind": "parameter", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": true, "deprecationNote":
"The consumer polls the topic with one task, so a value above 1 only adds idle
threads", "autowired": false, "secret": false, "defaultValue": 1,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "de [...]
+ "partitionId": { "index": 16, "kind": "parameter", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
+ "pollBatchSize": { "index": 17, "kind": "parameter", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
+ "pollingStrategy": { "index": 18, "kind": "parameter", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoC [...]
+ "shutdownTimeout": { "index": 19, "kind": "parameter", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 30000, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in milliseconds that the consumer
waits for its polling thread to finish when i [...]
+ "startingOffset": { "index": 20, "kind": "parameter", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
+ "bridgeErrorHandler": { "index": 21, "kind": "parameter", "displayName":
"Bridge Error Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions (if possible) occurred
while the Camel consumer is trying to pickup incoming [...]
+ "exceptionHandler": { "index": 22, "kind": "parameter", "displayName":
"Exception Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By de [...]
+ "exchangePattern": { "index": 23, "kind": "parameter", "displayName":
"Exchange Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "enum", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ],
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
+ "partitioning": { "index": 24, "kind": "parameter", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it [...]
+ "lazyStartProducer": { "index": 25, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
+ "headerFilterStrategy": { "index": 26, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter the user headers of a consumed Iggy message before the consumer sets
them as Camel headers. The producer does not send Camel headers." },
+ "password": { "index": 27, "kind": "parameter", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the use [...]
"sslContextParameters": { "index": 28, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "SSL configuration using an
org.apache.camel.support.js [...]
"tlsCertificatePath": { "index": 29, "kind": "parameter", "displayName":
"Tls Certificate Path", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The path to a certificate file in PEM format
that the client trusts for the TLS connection t [...]
"tlsEnabled": { "index": 30, "kind": "parameter", "displayName": "Tls
Enabled", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the client connects to the Iggy server
over TLS." },
diff --git
a/components/camel-iggy/src/generated/java/org/apache/camel/component/iggy/IggyConvertersLoader.java
b/components/camel-iggy/src/generated/java/org/apache/camel/component/iggy/IggyConvertersLoader.java
new file mode 100644
index 000000000000..90b433d90aa5
--- /dev/null
+++
b/components/camel-iggy/src/generated/java/org/apache/camel/component/iggy/IggyConvertersLoader.java
@@ -0,0 +1,60 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.iggy;
+
+import javax.annotation.processing.Generated;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.DeferredContextBinding;
+import org.apache.camel.Exchange;
+import org.apache.camel.TypeConversionException;
+import org.apache.camel.TypeConverterLoaderException;
+import org.apache.camel.spi.TypeConverterLoader;
+import org.apache.camel.spi.TypeConverterRegistry;
+import org.apache.camel.support.SimpleTypeConverter;
+import org.apache.camel.support.TypeConverterSupport;
+import org.apache.camel.util.DoubleMap;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.TypeConverterLoaderGeneratorMojo")
+@SuppressWarnings("unchecked")
+@DeferredContextBinding
+public final class IggyConvertersLoader implements TypeConverterLoader,
CamelContextAware {
+
+ private CamelContext camelContext;
+
+ public IggyConvertersLoader() {
+ }
+
+ @Override
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ @Override
+ public CamelContext getCamelContext() {
+ return camelContext;
+ }
+
+ @Override
+ public void load(TypeConverterRegistry registry) throws
TypeConverterLoaderException {
+ registerConverters(registry);
+ }
+
+ private void registerConverters(TypeConverterRegistry registry) {
+ addTypeConverter(registry, org.apache.iggy.message.Partitioning.class,
java.lang.String.class, false,
+ (type, exchange, value) -> {
+ Object answer =
org.apache.camel.component.iggy.IggyConverters.toPartitioning((java.lang.String)
value);
+ if (false && answer == null) {
+ answer = Void.class;
+ }
+ return answer;
+ });
+ }
+
+ private static void addTypeConverter(TypeConverterRegistry registry,
Class<?> toType, Class<?> fromType, boolean allowNull,
SimpleTypeConverter.ConversionMethod method) {
+ registry.addTypeConverter(toType, fromType, new
SimpleTypeConverter(allowNull, method));
+ }
+}
diff --git
a/components/camel-iggy/src/generated/resources/META-INF/org/apache/camel/component/iggy/iggy.json
b/components/camel-iggy/src/generated/resources/META-INF/org/apache/camel/component/iggy/iggy.json
index 1292a1e56e1b..cebf889b0e60 100644
---
a/components/camel-iggy/src/generated/resources/META-INF/org/apache/camel/component/iggy/iggy.json
+++
b/components/camel-iggy/src/generated/resources/META-INF/org/apache/camel/component/iggy/iggy.json
@@ -34,22 +34,22 @@
"maxTopicSize": { "index": 7, "kind": "property", "displayName": "Max
Topic Size", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum size in bytes of a topic that
autoCreateTopic creates. With 0 no maximum size is set o [...]
"messageExpiry": { "index": 8, "kind": "property", "displayName": "Message
Expiry", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in seconds after which the server
deletes the messages of a topic that autoCreateTopic c [...]
"partitionsCount": { "index": 9, "kind": "property", "displayName":
"Partitions Count", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of partitions of a topic that
autoCreateTopic creates." },
- "password": { "index": 10, "kind": "property", "displayName": "Password",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the username optio [...]
- "port": { "index": 11, "kind": "property", "displayName": "Port", "group":
"common", "label": "", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 8090,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The port of the Iggy
server. The default 8090 is the default port of the TCP transport of the
server, so set the HTTP port [...]
- "streamId": { "index": 12, "kind": "property", "displayName": "Stream Id",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up: if no stream has this ID, a stream named streamName is created. The produc
[...]
- "streamName": { "index": 13, "kind": "property", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header repl [...]
- "autoCommit": { "index": 14, "kind": "property", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
- "bridgeErrorHandler": { "index": 15, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the lik [...]
- "consumerGroupName": { "index": 16, "kind": "property", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requi [...]
- "consumersCount": { "index": 17, "kind": "property", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of threads of the thread pool of
the consumer. The consumer runs one polling task, s [...]
- "partitionId": { "index": 18, "kind": "property", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
- "pollBatchSize": { "index": 19, "kind": "property", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
- "pollingStrategy": { "index": 20, "kind": "property", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoCo [...]
- "shutdownTimeout": { "index": 21, "kind": "property", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "common,consumer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 30000,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The time in milliseconds
that the consumer waits for its polling thread to finish [...]
- "startingOffset": { "index": 22, "kind": "property", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
- "lazyStartProducer": { "index": 23, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fai [...]
- "partitioning": { "index": 24, "kind": "property", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it s [...]
- "autowiredEnabled": { "index": 25, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
+ "port": { "index": 10, "kind": "property", "displayName": "Port", "group":
"common", "label": "", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 8090,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The port of the Iggy
server. The default 8090 is the default port of the TCP transport of the
server, so set the HTTP port [...]
+ "streamId": { "index": 11, "kind": "property", "displayName": "Stream Id",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up for the stream of the endpoint: if no stream has this ID, a stream named st
[...]
+ "streamName": { "index": 12, "kind": "property", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header repl [...]
+ "autoCommit": { "index": 13, "kind": "property", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
+ "bridgeErrorHandler": { "index": 14, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the lik [...]
+ "consumerGroupName": { "index": 15, "kind": "property", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requi [...]
+ "consumersCount": { "index": 16, "kind": "property", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": true, "deprecationNote":
"The consumer polls the topic with one task, so a value above 1 only adds idle
threads", "autowired": false, "secret": false, "defaultValue": 1,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "des [...]
+ "partitionId": { "index": 17, "kind": "property", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
+ "pollBatchSize": { "index": 18, "kind": "property", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
+ "pollingStrategy": { "index": 19, "kind": "property", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoCo [...]
+ "shutdownTimeout": { "index": 20, "kind": "property", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 30000, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in milliseconds that the consumer
waits for its polling thread to finish when it [...]
+ "startingOffset": { "index": 21, "kind": "property", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
+ "lazyStartProducer": { "index": 22, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fai [...]
+ "partitioning": { "index": 23, "kind": "property", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it s [...]
+ "autowiredEnabled": { "index": 24, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
+ "password": { "index": 25, "kind": "property", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the user [...]
"sslContextParameters": { "index": 26, "kind": "property", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "SSL configuration using an
org.apache.camel.support.jss [...]
"tlsCertificatePath": { "index": 27, "kind": "property", "displayName":
"Tls Certificate Path", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The path to a certificate file in PEM format
that the client trusts for the TLS connection to [...]
"tlsEnabled": { "index": 28, "kind": "property", "displayName": "Tls
Enabled", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the client connects to the Iggy server
over TLS." },
@@ -65,7 +65,7 @@
"CamelIggyMessageLength": { "index": 5, "kind": "header", "displayName":
"", "group": "consumer", "label": "consumer", "required": false, "javaType":
"Long", "deprecated": false, "autowired": false, "secret": false,
"description": "The length of the payload of the message, in bytes.",
"constantName": "org.apache.camel.component.iggy.IggyConstants#MESSAGE_LENGTH"
},
"CamelIggyMessageSize": { "index": 6, "kind": "header", "displayName": "",
"group": "consumer", "label": "consumer", "required": false, "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "description": "The
size of the message in bytes: the header, the payload and the user headers.",
"constantName": "org.apache.camel.component.iggy.IggyConstants#MESSAGE_SIZE" },
"CamelIggyTopicOverride": { "index": 7, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the topic to send to, instead of the topic of the
endpoint. The producer creates the topic if it does not exist and
autoCreateTopic is true.", "constantName":
"org.apache.camel.component.iggy.IggyConstants#TOPIC_OVERRIDE" },
- "CamelIggyStreamOverride": { "index": 8, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the stream to send to, instead of the streamName of
the endpoint. The producer creates the stream if it does not exist, when
autoCreateStream is true and streamId is not set.", "constantName":
"org.apache.camel.component.iggy.IggyConstants#S [...]
+ "CamelIggyStreamOverride": { "index": 8, "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "autowired": false, "secret": false,
"description": "The name of the stream to send to, instead of the streamName of
the endpoint. The producer creates the stream if it does not exist, when
autoCreateStream is true; streamId is used only for the stream of the
endpoint.", "constantName": "org.apache.camel. [...]
},
"bodyTypes": {
"consumerOut": { "carriers": [ "bytes" ], "javaType": "byte[]",
"description": "The payload of the Iggy message as a byte array: convert or
unmarshal it" },
@@ -83,24 +83,24 @@
"maxTopicSize": { "index": 7, "kind": "parameter", "displayName": "Max
Topic Size", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum size in bytes of a topic that
autoCreateTopic creates. With 0 no maximum size is set [...]
"messageExpiry": { "index": 8, "kind": "parameter", "displayName":
"Message Expiry", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in seconds after which the server
deletes the messages of a topic that autoCreateTopic [...]
"partitionsCount": { "index": 9, "kind": "parameter", "displayName":
"Partitions Count", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of partitions of a topic that
autoCreateTopic creates." },
- "password": { "index": 10, "kind": "parameter", "displayName": "Password",
"group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the username opti [...]
- "port": { "index": 11, "kind": "parameter", "displayName": "Port",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 8090, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The port of the Iggy server. The default 8090
is the default port of the TCP transport of the server, so set the HTTP port
[...]
- "streamId": { "index": 12, "kind": "parameter", "displayName": "Stream
Id", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up: if no stream has this ID, a stream named streamName is created. The produ
[...]
- "streamName": { "index": 13, "kind": "parameter", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header rep [...]
- "autoCommit": { "index": 14, "kind": "parameter", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
- "consumerGroupName": { "index": 15, "kind": "parameter", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requ [...]
- "consumersCount": { "index": 16, "kind": "parameter", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 1, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The number of threads of the thread pool of
the consumer. The consumer runs one polling task, [...]
- "partitionId": { "index": 17, "kind": "parameter", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
- "pollBatchSize": { "index": 18, "kind": "parameter", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
- "pollingStrategy": { "index": 19, "kind": "parameter", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoC [...]
- "shutdownTimeout": { "index": 20, "kind": "parameter", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "common,consumer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 30000,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "description": "The time in milliseconds
that the consumer waits for its polling thread to finish [...]
- "startingOffset": { "index": 21, "kind": "parameter", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
- "bridgeErrorHandler": { "index": 22, "kind": "parameter", "displayName":
"Bridge Error Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions (if possible) occurred
while the Camel consumer is trying to pickup incoming [...]
- "exceptionHandler": { "index": 23, "kind": "parameter", "displayName":
"Exception Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By de [...]
- "exchangePattern": { "index": 24, "kind": "parameter", "displayName":
"Exchange Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "enum", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ],
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
- "partitioning": { "index": 25, "kind": "parameter", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it [...]
- "lazyStartProducer": { "index": 26, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "headerFilterStrategy": { "index": 27, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter the user headers of a consumed Iggy message before the consumer sets
them as Camel headers. The producer does not send Camel headers." },
+ "port": { "index": 10, "kind": "parameter", "displayName": "Port",
"group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 8090, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The port of the Iggy server. The default 8090
is the default port of the TCP transport of the server, so set the HTTP port
[...]
+ "streamId": { "index": 11, "kind": "parameter", "displayName": "Stream
Id", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "java.lang.Long", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of a stream that autoCreateStream looks
up for the stream of the endpoint: if no stream has this ID, a stream named s
[...]
+ "streamName": { "index": 12, "kind": "parameter", "displayName": "Stream
Name", "group": "common", "label": "", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "endpointIdentity": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header rep [...]
+ "autoCommit": { "index": 13, "kind": "parameter", "displayName": "Auto
Commit", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the server stores the offset of the
consumer group when it returns the polled messages, [...]
+ "consumerGroupName": { "index": 14, "kind": "parameter", "displayName":
"Consumer Group Name", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The name of the consumer group that the
consumer joins, and creates if it does not exist. Requ [...]
+ "consumersCount": { "index": 15, "kind": "parameter", "displayName":
"Consumers Count", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "int", "deprecated": true, "deprecationNote":
"The consumer polls the topic with one task, so a value above 1 only adds idle
threads", "autowired": false, "secret": false, "defaultValue": 1,
"configurationClass": "org.apache.camel.component.iggy.IggyConfiguration",
"configurationField": "configuration", "de [...]
+ "partitionId": { "index": 16, "kind": "parameter", "displayName":
"Partition Id", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The ID of the partition that the consumer
polls. If not set, the server chooses the partition for the member [...]
+ "pollBatchSize": { "index": 17, "kind": "parameter", "displayName": "Poll
Batch Size", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 10, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The maximum number of messages that the
consumer polls in one request." },
+ "pollingStrategy": { "index": 18, "kind": "parameter", "displayName":
"Polling Strategy", "group": "consumer", "label": "consumer", "required":
false, "type": "enum", "javaType": "java.lang.String", "enum": [ "next",
"first", "last" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "next", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Where the consumer polls from when autoC [...]
+ "shutdownTimeout": { "index": 19, "kind": "parameter", "displayName":
"Shutdown Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": 30000, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The time in milliseconds that the consumer
waits for its polling thread to finish when i [...]
+ "startingOffset": { "index": 20, "kind": "parameter", "displayName":
"Starting Offset", "group": "consumer", "label": "consumer", "required": false,
"type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": 0, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The offset of the first message that the
consumer polls when autoCommit is false. 0 [...]
+ "bridgeErrorHandler": { "index": 21, "kind": "parameter", "displayName":
"Bridge Error Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions (if possible) occurred
while the Camel consumer is trying to pickup incoming [...]
+ "exceptionHandler": { "index": 22, "kind": "parameter", "displayName":
"Exception Handler", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By de [...]
+ "exchangePattern": { "index": 23, "kind": "parameter", "displayName":
"Exchange Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "enum", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ],
"deprecated": false, "autowired": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
+ "partitioning": { "index": 24, "kind": "parameter", "displayName":
"Partitioning", "group": "producer", "label": "producer", "required": false,
"type": "object", "javaType": "org.apache.iggy.message.Partitioning",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
"balanced", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "How the producer chooses the partition of the
messages it [...]
+ "lazyStartProducer": { "index": 25, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
+ "headerFilterStrategy": { "index": 26, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter the user headers of a consumed Iggy message before the consumer sets
them as Camel headers. The producer does not send Camel headers." },
+ "password": { "index": 27, "kind": "parameter", "displayName": "Password",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The password that the client logs in with to
the Iggy server. Required, together with the use [...]
"sslContextParameters": { "index": 28, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "SSL configuration using an
org.apache.camel.support.js [...]
"tlsCertificatePath": { "index": 29, "kind": "parameter", "displayName":
"Tls Certificate Path", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "The path to a certificate file in PEM format
that the client trusts for the TLS connection t [...]
"tlsEnabled": { "index": 30, "kind": "parameter", "displayName": "Tls
Enabled", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.iggy.IggyConfiguration", "configurationField":
"configuration", "description": "Whether the client connects to the Iggy server
over TLS." },
diff --git
a/components/camel-iggy/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
b/components/camel-iggy/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
new file mode 100644
index 000000000000..ebfafa8e279e
--- /dev/null
+++
b/components/camel-iggy/src/generated/resources/META-INF/services/org/apache/camel/TypeConverterLoader
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+org.apache.camel.component.iggy.IggyConvertersLoader
diff --git
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConfiguration.java
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConfiguration.java
index 4c10484ee6d2..8042c8df5484 100644
---
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConfiguration.java
+++
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConfiguration.java
@@ -20,6 +20,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
import org.apache.camel.support.jsse.SSLContextParameters;
@@ -39,7 +40,7 @@ public class IggyConfiguration implements Cloneable {
description = "The username that the client logs in with to the
Iggy server. Required, together with the"
+ " password option: the client fails to connect
without them.")
private String username;
- @UriParam(security = "secret",
+ @UriParam(security = "secret", label = "security",
description = "The password that the client logs in with to the
Iggy server. Required, together with the"
+ " username option: the client fails to connect
without them.")
private String password;
@@ -53,8 +54,10 @@ public class IggyConfiguration implements Cloneable {
+ " and the consumer check it when they start, and
the producer again for each message that has"
+ " an override header.")
private boolean autoCreateTopic = true;
- @UriParam(description = "The ID of a stream that autoCreateStream looks
up: if no stream has this ID, a stream named"
- + " streamName is created. The producer and the
consumer always address the stream by its name.")
+ @UriParam(description = "The ID of a stream that autoCreateStream looks up
for the stream of the endpoint: if no stream"
+ + " has this ID, a stream named streamName is
created. The stream of a CamelIggyStreamOverride"
+ + " header is looked up and created by its name.
The producer and the consumer always address"
+ + " the stream by its name.")
private Long streamId;
@UriParam(description = "The name of the stream that holds the topic.
Required. The CamelIggyStreamOverride header"
+ " replaces it for the producer.",
@@ -78,8 +81,10 @@ public class IggyConfiguration implements Cloneable {
private Map<String, String> iggyHeaderOptions = new HashMap<>();
@UriParam(label = "producer", defaultValue = "balanced",
description = "How the producer chooses the partition of the
messages it sends, as an"
- + " org.apache.iggy.message.Partitioning:
balanced() spreads them over the partitions,"
- + " partitionId(Long) sends to one partition and
messagesKey(String) to the partition of a key.")
+ + " org.apache.iggy.message.Partitioning or as
text: balanced() (the text balanced) spreads them"
+ + " over the partitions, partitionId(Long) (for
example the text partitionId:2) sends to one"
+ + " partition and messagesKey(String) (for example
the text messagesKey:order-1) to the partition"
+ + " of a key.")
private Partitioning partitioning = Partitioning.balanced();
@UriParam(label = "consumer",
description = "The name of the consumer group that the consumer
joins, and creates if it does not exist."
@@ -95,8 +100,10 @@ public class IggyConfiguration implements Cloneable {
@UriParam(label = "consumer", defaultValue = "1",
description = "The number of threads of the thread pool of the
consumer. The consumer runs one polling task, so"
+ " one thread polls the topic.")
+ @Metadata(deprecationNote = "The consumer polls the topic with one task,
so a value above 1 only adds idle threads")
+ @Deprecated(since = "4.24.0")
private int consumersCount = 1;
- @UriParam(label = "common,consumer", defaultValue = "30000",
+ @UriParam(label = "consumer", defaultValue = "30000",
description = "The time in milliseconds that the consumer waits
for its polling thread to finish when it stops,"
+ " before it interrupts the thread.")
private int shutdownTimeout = 30000;
@@ -265,10 +272,18 @@ public class IggyConfiguration implements Cloneable {
this.partitionId = partitionId;
}
+ /**
+ * @deprecated the consumer polls the topic with one task, so a value
above 1 only adds idle threads
+ */
+ @Deprecated(since = "4.24.0")
public int getConsumersCount() {
return consumersCount;
}
+ /**
+ * @deprecated the consumer polls the topic with one task, so a value
above 1 only adds idle threads
+ */
+ @Deprecated(since = "4.24.0")
public void setConsumersCount(int consumersCount) {
this.consumersCount = consumersCount;
}
diff --git
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConstants.java
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConstants.java
index 360ea338e235..b3737d9cb1ae 100644
---
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConstants.java
+++
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConstants.java
@@ -49,8 +49,8 @@ public final class IggyConstants {
public static final String TOPIC_OVERRIDE = "CamelIggyTopicOverride";
@Metadata(label = "producer",
description = "The name of the stream to send to, instead of the
streamName of the endpoint. The producer"
- + " creates the stream if it does not exist, when
autoCreateStream is true and streamId is not"
- + " set.",
+ + " creates the stream if it does not exist, when
autoCreateStream is true; streamId is used only"
+ + " for the stream of the endpoint.",
javaType = "String")
public static final String STREAM_OVERRIDE = "CamelIggyStreamOverride";
diff --git
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConsumer.java
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConsumer.java
index d849d61e4e9f..4dea8c51f34d 100644
---
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConsumer.java
+++
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConsumer.java
@@ -51,7 +51,7 @@ public class IggyConsumer extends DefaultConsumer {
@Override
protected void doStart() throws Exception {
super.doStart();
- LOG.info("Starting Iggy consumer for stream {} and topic {}",
endpoint.getConfiguration().getStreamId(),
+ LOG.info("Starting Iggy consumer for stream {} and topic {}",
endpoint.getConfiguration().getStreamName(),
endpoint.getTopicName());
iggyClientConnectionPool = new IggyClientConnectionPool(
@@ -90,7 +90,7 @@ public class IggyConsumer extends DefaultConsumer {
@Override
protected void doStop() throws Exception {
- LOG.info("Stopping Iggy consumer for stream {} and topic {}",
endpoint.getConfiguration().getStreamId(),
+ LOG.info("Stopping Iggy consumer for stream {} and topic {}",
endpoint.getConfiguration().getStreamName(),
endpoint.getTopicName());
if (executor != null) {
diff --git
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConverters.java
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConverters.java
new file mode 100644
index 000000000000..3b933cfae1a6
--- /dev/null
+++
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyConverters.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.iggy;
+
+import java.util.Locale;
+
+import org.apache.camel.Converter;
+import org.apache.iggy.message.Partitioning;
+
+/**
+ * Converts the text of the partitioning option to the Iggy {@link
Partitioning}.
+ */
+@Converter(generateLoader = true)
+public final class IggyConverters {
+
+ private static final String PARTITION_ID = "partitionid:";
+ private static final String MESSAGES_KEY = "messageskey:";
+
+ private IggyConverters() {
+ // Utility Class
+ }
+
+ /**
+ * Converts balanced, partitionId:<partition id> or
messagesKey:<key> (the prefixes are not
+ * case-sensitive) to a {@link Partitioning}.
+ */
+ @Converter
+ public static Partitioning toPartitioning(String text) {
+ String value = text.trim();
+ String lower = value.toLowerCase(Locale.ROOT);
+ if (lower.equals("balanced")) {
+ return Partitioning.balanced();
+ }
+ if (lower.startsWith(PARTITION_ID)) {
+ try {
+ return
Partitioning.partitionId(Long.valueOf(value.substring(PARTITION_ID.length()).trim()));
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException(
+ "Invalid partition id in: " + text + ". Use
partitionId:<partition id>", e);
+ }
+ }
+ if (lower.startsWith(MESSAGES_KEY)) {
+ return
Partitioning.messagesKey(value.substring(MESSAGES_KEY.length()).trim());
+ }
+ throw new IllegalArgumentException(
+ "Unknown partitioning: " + text + ". Use balanced,
partitionId:<partition id> or messagesKey:<key>");
+ }
+}
diff --git
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyEndpoint.java
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyEndpoint.java
index 473fca67b101..6dbb1661f71b 100644
---
a/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyEndpoint.java
+++
b/components/camel-iggy/src/main/java/org/apache/camel/component/iggy/IggyEndpoint.java
@@ -104,7 +104,8 @@ public class IggyEndpoint extends DefaultEndpoint
implements HeaderFilterStrateg
String stream = streamName != null ? streamName :
iggyConfiguration.getStreamName();
if (iggyConfiguration.isAutoCreateStream()) {
- if (iggyConfiguration.getStreamId() != null) {
+ // streamId identifies the stream of the endpoint, not the one of
a CamelIggyStreamOverride header
+ if (iggyConfiguration.getStreamId() != null &&
stream.equals(iggyConfiguration.getStreamName())) {
client.streams().getStream(StreamId.of(iggyConfiguration.getStreamId())).orElseGet(()
-> {
LOG.debug("Creating stream with id {} and name {}",
iggyConfiguration.getStreamId(),
iggyConfiguration.getStreamName());
diff --git
a/components/camel-iggy/src/test/java/org/apache/camel/component/iggy/IggyStreamOverridePartitioningTest.java
b/components/camel-iggy/src/test/java/org/apache/camel/component/iggy/IggyStreamOverridePartitioningTest.java
new file mode 100644
index 000000000000..fad797fe160a
--- /dev/null
+++
b/components/camel-iggy/src/test/java/org/apache/camel/component/iggy/IggyStreamOverridePartitioningTest.java
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.iggy;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Optional;
+
+import org.apache.camel.ResolveEndpointFailedException;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.apache.iggy.client.blocking.IggyBaseClient;
+import org.apache.iggy.identifier.StreamId;
+import org.apache.iggy.message.Partitioning;
+import org.apache.iggy.message.PartitioningKind;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * The stream of a CamelIggyStreamOverride header is created when streamId is
set, and the partitioning option can be
+ * given as text. The Iggy client is a mock, no Iggy server is needed.
+ */
+public class IggyStreamOverridePartitioningTest extends CamelTestSupport {
+
+ private static final String URI =
"iggy:topic?streamName=stream&streamId=1&autoCreateTopic=false";
+
+ @Test
+ void theStreamOfTheOverrideHeaderIsCreatedWhenStreamIdIsSet() throws
Exception {
+ IggyEndpoint endpoint = context.getEndpoint(URI, IggyEndpoint.class);
+ IggyBaseClient client = missingStreams();
+
+ // the producer initializes the topic of a message with the
CamelIggyStreamOverride header so
+ endpoint.initializeTopic(client, "topic", "other");
+
+ verify(client.streams()).getStream(argThat((StreamId id) ->
"other".equals(id.getName())));
+ verify(client.streams()).createStream("other");
+ verify(client.streams(), never()).createStream("stream");
+ }
+
+ @Test
+ void theStreamOfTheEndpointIsLookedUpByStreamId() throws Exception {
+ IggyEndpoint endpoint = context.getEndpoint(URI, IggyEndpoint.class);
+ IggyBaseClient client = missingStreams();
+
+ endpoint.initializeTopic(client);
+
+ verify(client.streams()).getStream(argThat((StreamId id) ->
Long.valueOf(1).equals(id.getId())));
+ verify(client.streams()).createStream("stream");
+ }
+
+ @Test
+ void thePartitioningOptionAsText() {
+ assertPartitioning("balanced", PartitioningKind.Balanced,
Partitioning.balanced().value());
+ assertPartitioning("partitionId:3", PartitioningKind.PartitionId,
Partitioning.partitionId(3L).value());
+ assertPartitioning("messagesKey:order-1", PartitioningKind.MessagesKey,
+ "order-1".getBytes(StandardCharsets.UTF_8));
+ }
+
+ @Test
+ void anUnknownPartitioningFailsTheEndpoint() {
+ assertThrows(ResolveEndpointFailedException.class,
+ () ->
context.getEndpoint("iggy:topic?streamName=stream&partitioning=roundRobin"));
+ }
+
+ @Test
+ void theKeyOfMessagesKeyIsTrimmed() {
+ Partitioning partitioning =
IggyConverters.toPartitioning("messagesKey: order-1");
+
+ assertEquals(PartitioningKind.MessagesKey, partitioning.kind());
+ assertArrayEquals("order-1".getBytes(StandardCharsets.UTF_8),
partitioning.value());
+ }
+
+ @Test
+ void anInvalidPartitionIdFailsWithTheExpectedFormat() {
+ IllegalArgumentException e =
assertThrows(IllegalArgumentException.class,
+ () -> IggyConverters.toPartitioning("partitionId:abc"));
+
+ assertEquals("Invalid partition id in: partitionId:abc. Use
partitionId:<partition id>", e.getMessage());
+ assertInstanceOf(NumberFormatException.class, e.getCause());
+ }
+
+ private void assertPartitioning(String text, PartitioningKind kind, byte[]
value) {
+ Partitioning partitioning =
context.getEndpoint("iggy:topic?streamName=stream&partitioning=" + text,
+ IggyEndpoint.class).getConfiguration().getPartitioning();
+
+ assertEquals(kind, partitioning.kind(), text);
+ assertArrayEquals(value, partitioning.value(), text);
+ }
+
+ private static IggyBaseClient missingStreams() {
+ IggyBaseClient client = mock(IggyBaseClient.class, RETURNS_DEEP_STUBS);
+
when(client.streams().getStream(any(StreamId.class))).thenReturn(Optional.empty());
+ return client;
+ }
+}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 1820588202e8..35a3840f3748 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -6058,6 +6058,18 @@ charset of the JVM, which corrupted binary payloads.
Camel converts the `byte[]`
needed, with the charset of the exchange (`CamelCharsetName`) if set, but code
that reads the body with `getBody()`
and expects a `String` must now use `getBody(String.class)` or add
`convertBodyTo(String.class)` to the route.
+=== camel-iggy - the stream of the override header with streamId, partitioning
as text, consumersCount deprecated
+
+With `streamId` and `autoCreateStream=true`, the producer looked up the stream
of a `CamelIggyStreamOverride` header
+by `streamId`, and created the stream of the endpoint when it was missing, so
the message failed on a stream that
+did not exist. The stream of the header is now looked up and created by its
name; `streamId` is only used for the
+stream of the endpoint.
+
+The `partitioning` option can now be given as text: `balanced`,
`partitionId:<partition id>` or `messagesKey:<key>`.
+Before, only a bean reference worked. The `consumersCount` option is
deprecated: the consumer polls with one task, so
+a value above 1 only adds idle threads. `password` is in the `security` group
and `shutdownTimeout` in the `consumer`
+group of the catalog and the docs.
+
=== camel-jira - the newIssues consumer reads every new issue
A poll of the `newIssues` consumer read only the newest `maxResults` (default
50) of the issues created since the
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IggyComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IggyComponentBuilderFactory.java
index 58a6b6f740bf..f217ecb9c4f1 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IggyComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IggyComponentBuilderFactory.java
@@ -230,23 +230,6 @@ public interface IggyComponentBuilderFactory {
return this;
}
- /**
- * The password that the client logs in with to the Iggy server.
- * Required, together with the username option: the client fails to
- * connect without them.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- *
- * @param password the value to set
- * @return the dsl builder
- */
- default IggyComponentBuilder password(java.lang.String password) {
- doSetProperty("password", password);
- return this;
- }
-
/**
* The port of the Iggy server. The default 8090 is the default port of
@@ -267,9 +250,11 @@ public interface IggyComponentBuilderFactory {
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option is a: <code>java.lang.Long</code> type.
*
@@ -367,6 +352,8 @@ public interface IggyComponentBuilderFactory {
/**
* The number of threads of the thread pool of the consumer. The
* consumer runs one polling task, so one thread polls the topic.
+ * Deprecation note: The consumer polls the topic with one task, so a
+ * value above 1 only adds idle threads.
*
* The option is a: <code>int</code> type.
*
@@ -376,6 +363,7 @@ public interface IggyComponentBuilderFactory {
* @param consumersCount the value to set
* @return the dsl builder
*/
+ @Deprecated
default IggyComponentBuilder consumersCount(int consumersCount) {
doSetProperty("consumersCount", consumersCount);
return this;
@@ -497,9 +485,11 @@ public interface IggyComponentBuilderFactory {
/**
* How the producer chooses the partition of the messages it sends, as
- * an org.apache.iggy.message.Partitioning: balanced() spreads them
over
- * the partitions, partitionId(Long) sends to one partition and
- * messagesKey(String) to the partition of a key.
+ * an org.apache.iggy.message.Partitioning or as text: balanced() (the
+ * text balanced) spreads them over the partitions, partitionId(Long)
+ * (for example the text partitionId:2) sends to one partition and
+ * messagesKey(String) (for example the text messagesKey:order-1) to
the
+ * partition of a key.
*
* The option is a:
* <code>org.apache.iggy.message.Partitioning</code> type.
@@ -537,6 +527,23 @@ public interface IggyComponentBuilderFactory {
return this;
}
+ /**
+ * The password that the client logs in with to the Iggy server.
+ * Required, together with the username option: the client fails to
+ * connect without them.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param password the value to set
+ * @return the dsl builder
+ */
+ default IggyComponentBuilder password(java.lang.String password) {
+ doSetProperty("password", password);
+ return this;
+ }
+
/**
* SSL configuration using an
* org.apache.camel.support.jsse.SSLContextParameters instance. This
@@ -654,7 +661,6 @@ public interface IggyComponentBuilderFactory {
case "maxTopicSize": getOrCreateConfiguration((IggyComponent)
component).setMaxTopicSize((java.lang.Long) value); return true;
case "messageExpiry": getOrCreateConfiguration((IggyComponent)
component).setMessageExpiry((java.lang.Long) value); return true;
case "partitionsCount": getOrCreateConfiguration((IggyComponent)
component).setPartitionsCount((java.lang.Long) value); return true;
- case "password": getOrCreateConfiguration((IggyComponent)
component).setPassword((java.lang.String) value); return true;
case "port": getOrCreateConfiguration((IggyComponent)
component).setPort((int) value); return true;
case "streamId": getOrCreateConfiguration((IggyComponent)
component).setStreamId((java.lang.Long) value); return true;
case "streamName": getOrCreateConfiguration((IggyComponent)
component).setStreamName((java.lang.String) value); return true;
@@ -670,6 +676,7 @@ public interface IggyComponentBuilderFactory {
case "lazyStartProducer": ((IggyComponent)
component).setLazyStartProducer((boolean) value); return true;
case "partitioning": getOrCreateConfiguration((IggyComponent)
component).setPartitioning((org.apache.iggy.message.Partitioning) value);
return true;
case "autowiredEnabled": ((IggyComponent)
component).setAutowiredEnabled((boolean) value); return true;
+ case "password": getOrCreateConfiguration((IggyComponent)
component).setPassword((java.lang.String) value); return true;
case "sslContextParameters":
getOrCreateConfiguration((IggyComponent)
component).setSslContextParameters((org.apache.camel.support.jsse.SSLContextParameters)
value); return true;
case "tlsCertificatePath":
getOrCreateConfiguration((IggyComponent)
component).setTlsCertificatePath((java.lang.String) value); return true;
case "tlsEnabled": getOrCreateConfiguration((IggyComponent)
component).setTlsEnabled((boolean) value); return true;
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IggyEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IggyEndpointBuilderFactory.java
index af402416081b..be196466d34b 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IggyEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IggyEndpointBuilderFactory.java
@@ -309,22 +309,6 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("partitionsCount", partitionsCount);
return this;
}
- /**
- * The password that the client logs in with to the Iggy server.
- * Required, together with the username option: the client fails to
- * connect without them.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- *
- * @param password the value to set
- * @return the dsl builder
- */
- default IggyEndpointConsumerBuilder password(String password) {
- doSetProperty("password", password);
- return this;
- }
/**
* The port of the Iggy server. The default 8090 is the default port of
* the TCP transport of the server, so set the HTTP port of the server
@@ -360,9 +344,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option is a: <code>java.lang.Long</code> type.
*
@@ -376,9 +362,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option will be converted to a <code>java.lang.Long</code> type.
*
@@ -460,6 +448,8 @@ public interface IggyEndpointBuilderFactory {
/**
* The number of threads of the thread pool of the consumer. The
* consumer runs one polling task, so one thread polls the topic.
+ * Deprecation note: The consumer polls the topic with one task, so a
+ * value above 1 only adds idle threads.
*
* The option is a: <code>int</code> type.
*
@@ -469,6 +459,7 @@ public interface IggyEndpointBuilderFactory {
* @param consumersCount the value to set
* @return the dsl builder
*/
+ @Deprecated
default IggyEndpointConsumerBuilder consumersCount(int consumersCount)
{
doSetProperty("consumersCount", consumersCount);
return this;
@@ -476,6 +467,8 @@ public interface IggyEndpointBuilderFactory {
/**
* The number of threads of the thread pool of the consumer. The
* consumer runs one polling task, so one thread polls the topic.
+ * Deprecation note: The consumer polls the topic with one task, so a
+ * value above 1 only adds idle threads.
*
* The option will be converted to a <code>int</code> type.
*
@@ -485,6 +478,7 @@ public interface IggyEndpointBuilderFactory {
* @param consumersCount the value to set
* @return the dsl builder
*/
+ @Deprecated
default IggyEndpointConsumerBuilder consumersCount(String
consumersCount) {
doSetProperty("consumersCount", consumersCount);
return this;
@@ -633,6 +627,22 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("startingOffset", startingOffset);
return this;
}
+ /**
+ * The password that the client logs in with to the Iggy server.
+ * Required, together with the username option: the client fails to
+ * connect without them.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param password the value to set
+ * @return the dsl builder
+ */
+ default IggyEndpointConsumerBuilder password(String password) {
+ doSetProperty("password", password);
+ return this;
+ }
/**
* SSL configuration using an
* org.apache.camel.support.jsse.SSLContextParameters instance. This
@@ -1170,22 +1180,6 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("partitionsCount", partitionsCount);
return this;
}
- /**
- * The password that the client logs in with to the Iggy server.
- * Required, together with the username option: the client fails to
- * connect without them.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- *
- * @param password the value to set
- * @return the dsl builder
- */
- default IggyEndpointProducerBuilder password(String password) {
- doSetProperty("password", password);
- return this;
- }
/**
* The port of the Iggy server. The default 8090 is the default port of
* the TCP transport of the server, so set the HTTP port of the server
@@ -1221,9 +1215,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option is a: <code>java.lang.Long</code> type.
*
@@ -1237,9 +1233,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option will be converted to a <code>java.lang.Long</code> type.
*
@@ -1269,9 +1267,11 @@ public interface IggyEndpointBuilderFactory {
}
/**
* How the producer chooses the partition of the messages it sends, as
- * an org.apache.iggy.message.Partitioning: balanced() spreads them
over
- * the partitions, partitionId(Long) sends to one partition and
- * messagesKey(String) to the partition of a key.
+ * an org.apache.iggy.message.Partitioning or as text: balanced() (the
+ * text balanced) spreads them over the partitions, partitionId(Long)
+ * (for example the text partitionId:2) sends to one partition and
+ * messagesKey(String) (for example the text messagesKey:order-1) to
the
+ * partition of a key.
*
* The option is a: <code>org.apache.iggy.message.Partitioning</code>
* type.
@@ -1288,9 +1288,11 @@ public interface IggyEndpointBuilderFactory {
}
/**
* How the producer chooses the partition of the messages it sends, as
- * an org.apache.iggy.message.Partitioning: balanced() spreads them
over
- * the partitions, partitionId(Long) sends to one partition and
- * messagesKey(String) to the partition of a key.
+ * an org.apache.iggy.message.Partitioning or as text: balanced() (the
+ * text balanced) spreads them over the partitions, partitionId(Long)
+ * (for example the text partitionId:2) sends to one partition and
+ * messagesKey(String) (for example the text messagesKey:order-1) to
the
+ * partition of a key.
*
* The option will be converted to a
* <code>org.apache.iggy.message.Partitioning</code> type.
@@ -1305,6 +1307,22 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("partitioning", partitioning);
return this;
}
+ /**
+ * The password that the client logs in with to the Iggy server.
+ * Required, together with the username option: the client fails to
+ * connect without them.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param password the value to set
+ * @return the dsl builder
+ */
+ default IggyEndpointProducerBuilder password(String password) {
+ doSetProperty("password", password);
+ return this;
+ }
/**
* SSL configuration using an
* org.apache.camel.support.jsse.SSLContextParameters instance. This
@@ -1771,22 +1789,6 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("partitionsCount", partitionsCount);
return this;
}
- /**
- * The password that the client logs in with to the Iggy server.
- * Required, together with the username option: the client fails to
- * connect without them.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: common
- *
- * @param password the value to set
- * @return the dsl builder
- */
- default IggyEndpointBuilder password(String password) {
- doSetProperty("password", password);
- return this;
- }
/**
* The port of the Iggy server. The default 8090 is the default port of
* the TCP transport of the server, so set the HTTP port of the server
@@ -1822,9 +1824,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option is a: <code>java.lang.Long</code> type.
*
@@ -1838,9 +1842,11 @@ public interface IggyEndpointBuilderFactory {
return this;
}
/**
- * The ID of a stream that autoCreateStream looks up: if no stream has
- * this ID, a stream named streamName is created. The producer and the
- * consumer always address the stream by its name.
+ * The ID of a stream that autoCreateStream looks up for the stream of
+ * the endpoint: if no stream has this ID, a stream named streamName is
+ * created. The stream of a CamelIggyStreamOverride header is looked up
+ * and created by its name. The producer and the consumer always
address
+ * the stream by its name.
*
* The option will be converted to a <code>java.lang.Long</code> type.
*
@@ -1868,6 +1874,22 @@ public interface IggyEndpointBuilderFactory {
doSetProperty("streamName", streamName);
return this;
}
+ /**
+ * The password that the client logs in with to the Iggy server.
+ * Required, together with the username option: the client fails to
+ * connect without them.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param password the value to set
+ * @return the dsl builder
+ */
+ default IggyEndpointBuilder password(String password) {
+ doSetProperty("password", password);
+ return this;
+ }
/**
* SSL configuration using an
* org.apache.camel.support.jsse.SSLContextParameters instance. This
@@ -2190,7 +2212,8 @@ public interface IggyEndpointBuilderFactory {
/**
* The name of the stream to send to, instead of the streamName of the
* endpoint. The producer creates the stream if it does not exist, when
- * autoCreateStream is true and streamId is not set.
+ * autoCreateStream is true; streamId is used only for the stream of
the
+ * endpoint.
*
* The option is a: {@code String} type.
*