This is an automated email from the ASF dual-hosted git repository.
nfilotto 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 92e85aeaa8e CAMEL-17792: Add documentation about the message headers
(P-Q) (#7349)
92e85aeaa8e is described below
commit 92e85aeaa8e9060b15c91b70b473c5d957d78ab5
Author: Nicolas Filotto <[email protected]>
AuthorDate: Mon Apr 4 16:51:05 2022 +0200
CAMEL-17792: Add documentation about the message headers (P-Q) (#7349)
## Motivation
It is now possible to document a message header using annotations, let's
leverage it to document the headers of the components.
## Modifications
For all the components whose name starts with a P or Q
* Document the messages headers using the annotations
* Migrate the existing documentation of message headers to use the
annotations instead
* Move constants corresponding to headers to the headers class.
* CAMEL-17792: Add doc about the message headers of camel-paho
* CAMEL-17792: Add doc about the message headers of camel-paho-mqtt5
* CAMEL-17792: Add doc about the message headers of camel-pdf
* CAMEL-17792: Add doc about the message headers of camel-pgevent
* CAMEL-17792: Add doc about the message headers of camel-printer
* CAMEL-17792: Add doc about the message headers of camel-pubnub
* CAMEL-17792: Add doc about the message headers of camel-pulsar
* CAMEL-17792: Add doc about the message headers of camel-quickfix
---
.../camel/component/paho/mqtt5/paho-mqtt5.json | 7 ++++++
.../src/main/docs/paho-mqtt5-component.adoc | 19 ++++------------
.../component/paho/mqtt5/PahoMqtt5Constants.java | 9 ++++++++
.../component/paho/mqtt5/PahoMqtt5Endpoint.java | 2 +-
.../org/apache/camel/component/paho/paho.json | 7 ++++++
.../camel-paho/src/main/docs/paho-component.adoc | 19 ++++------------
.../apache/camel/component/paho/PahoConstants.java | 9 ++++++++
.../apache/camel/component/paho/PahoEndpoint.java | 2 +-
.../org/apache/camel/component/pdf/pdf.json | 5 +++++
.../camel-pdf/src/main/docs/pdf-component.adoc | 23 +++-----------------
.../apache/camel/component/pdf/PdfEndpoint.java | 3 ++-
.../camel/component/pdf/PdfHeaderConstants.java | 18 ++++++++++++++++
.../apache/camel/component/pgevent/pgevent.json | 3 +++
.../src/main/docs/pgevent-component.adoc | 6 +++---
.../camel/component/pgevent/PgEventConstants.java} | 17 +++++++++------
.../camel/component/pgevent/PgEventConsumer.java | 2 +-
.../camel/component/pgevent/PgEventEndpoint.java | 2 +-
.../org/apache/camel/component/printer/lpr.json | 3 +++
.../camel-printer/src/main/docs/lpr-component.adoc | 10 +++++----
.../camel/component/printer/PrinterEndpoint.java | 4 +++-
.../org/apache/camel/component/pubnub/pubnub.json | 6 ++++++
.../src/main/docs/pubnub-component.adoc | 14 +++---------
.../camel/component/pubnub/PubNubConstants.java | 6 ++++++
.../camel/component/pubnub/PubNubEndpoint.java | 2 +-
.../org/apache/camel/component/pulsar/pulsar.json | 16 ++++++++++++++
.../src/main/docs/pulsar-component.adoc | 4 +++-
.../camel/component/pulsar/PulsarEndpoint.java | 4 +++-
.../camel/component/pulsar/PulsarProducer.java | 2 +-
.../pulsar/utils/message/PulsarMessageHeaders.java | 19 ++++++++++++++++
.../apache/camel/component/quickfixj/quickfix.json | 5 +++++
.../src/main/docs/quickfix-component.adoc | 25 +++-------------------
.../component/quickfixj/QuickfixjConsumer.java | 2 +-
.../component/quickfixj/QuickfixjEndpoint.java | 5 ++++-
33 files changed, 172 insertions(+), 108 deletions(-)
diff --git
a/components/camel-paho-mqtt5/src/generated/resources/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json
b/components/camel-paho-mqtt5/src/generated/resources/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json
index 90daee1b017..b0325b7a5bc 100644
---
a/components/camel-paho-mqtt5/src/generated/resources/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json
+++
b/components/camel-paho-mqtt5/src/generated/resources/org/apache/camel/component/paho/mqtt5/paho-mqtt5.json
@@ -55,6 +55,13 @@
"sslHostnameVerifier": { "kind": "property", "displayName": "Ssl Hostname
Verifier", "group": "security", "label": "security", "required": false, "type":
"object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.paho.mqtt5.PahoMqtt5Configuration",
"configurationField": "configuration", "description": "Sets the
HostnameVerifier for the SSL connection. Note that it will be used aft [...]
"userName": { "kind": "property", "displayName": "User Name", "group":
"security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": true, "configurationClass":
"org.apache.camel.component.paho.mqtt5.PahoMqtt5Configuration",
"configurationField": "configuration", "description": "Username to be used for
authentication against the MQTT broker" }
},
+ "headers": {
+ "CamelMqttTopic": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The name of the topic." },
+ "CamelMqttQoS": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "Integer",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The quality of service of the incoming message." },
+ "CamelPahoMqtt5Qos": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Integer",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The client quality of service level (0-2)." },
+ "CamelPahoMqtt5Retained": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Boolean",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Retain option." },
+ "CamelPahoMqtt5OverrideTopic": { "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The name of topic to override and send to
instead of topic specified on endpoint." }
+ },
"properties": {
"topic": { "kind": "path", "displayName": "Topic", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Name of the topic" },
"automaticReconnect": { "kind": "parameter", "displayName": "Automatic
Reconnect", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.paho.mqtt5.PahoMqtt5Configuration",
"configurationField": "configuration", "description": "Sets whether the client
will automatically attempt to reconnect to the server if the connec [...]
diff --git
a/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc
b/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc
index 707df18b7e0..1584a4c839e 100644
--- a/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc
+++ b/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc
@@ -53,24 +53,13 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
-
-== Headers
-
-The following headers are recognized by the Paho component:
-
-[width="100%",cols="10%,10%,10%,10%,60%",options="header",]
-|===
-|Header |Java constant |Endpoint type |Value type |Description
-
-|CamelMqttTopic |PahoConstants.MQTT_TOPIC |Consumer |String |The name of the
topic
-|CamelMqttQoS |PahoConstants.MQTT_QOS |Consumer |Integer |QualityOfService of
the incoming message
-|CamelPahoOverrideTopic |PahoConstants.CAMEL_PAHO_OVERRIDE_TOPIC |Producer
|String |Name of topic to override and send to instead of topic specified on
endpoint
-|===
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
== Default payload type
-By default Camel Paho component operates on the binary payloads
+By default, Camel Paho component operates on the binary payloads
extracted out of (or put into) the MQTT message:
[source,java]
diff --git
a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Constants.java
b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Constants.java
index b5235288675..3317fa364b1 100644
---
a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Constants.java
+++
b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Constants.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.paho.mqtt5;
+import org.apache.camel.spi.Metadata;
+
/**
* Constants to use when working with Paho MQTT 5 component.
*/
@@ -24,18 +26,25 @@ public final class PahoMqtt5Constants {
/**
* Header indicating a topic of a MQTT message.
*/
+ @Metadata(label = "consumer", description = "The name of the topic.",
javaType = "String")
public static final String MQTT_TOPIC = "CamelMqttTopic";
/**
* Header indicating a QoS of a MQTT message.
*/
+ @Metadata(label = "consumer", description = "The quality of service of the
incoming message.", javaType = "Integer")
public static final String MQTT_QOS = "CamelMqttQoS";
public static final String DEFAULT_BROKER_URL = "tcp://localhost:1883";
public static final int DEFAULT_QOS = 2;
public static final String CAMEL_PAHO = "CamelPahoMqtt5";
+ @Metadata(label = "producer", description = "The client quality of service
level (0-2).", javaType = "Integer")
public static final String CAMEL_PAHO_MSG_QOS = CAMEL_PAHO + "Qos";
+ @Metadata(label = "producer", description = "Retain option.", javaType =
"Boolean")
public static final String CAMEL_PAHO_MSG_RETAINED = CAMEL_PAHO +
"Retained";
+ @Metadata(label = "producer",
+ description = "The name of topic to override and send to instead
of topic specified on endpoint.",
+ javaType = "String")
public static final String CAMEL_PAHO_OVERRIDE_TOPIC = CAMEL_PAHO +
"OverrideTopic";
private PahoMqtt5Constants() {
diff --git
a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java
b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java
index 99908892341..33361d06012 100644
---
a/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java
+++
b/components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Endpoint.java
@@ -40,7 +40,7 @@ import org.eclipse.paho.mqttv5.common.MqttMessage;
*/
@UriEndpoint(firstVersion = "3.8.0", scheme = "paho-mqtt5", title = "Paho MQTT
5",
category = { Category.MESSAGING, Category.IOT },
- syntax = "paho-mqtt5:topic")
+ syntax = "paho-mqtt5:topic", headersClass =
PahoMqtt5Constants.class)
public class PahoMqtt5Endpoint extends DefaultEndpoint {
// Configuration members
diff --git
a/components/camel-paho/src/generated/resources/org/apache/camel/component/paho/paho.json
b/components/camel-paho/src/generated/resources/org/apache/camel/component/paho/paho.json
index 72bc2999bec..d34f4927c48 100644
---
a/components/camel-paho/src/generated/resources/org/apache/camel/component/paho/paho.json
+++
b/components/camel-paho/src/generated/resources/org/apache/camel/component/paho/paho.json
@@ -54,6 +54,13 @@
"sslHostnameVerifier": { "kind": "property", "displayName": "Ssl Hostname
Verifier", "group": "security", "label": "security", "required": false, "type":
"object", "javaType": "javax.net.ssl.HostnameVerifier", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.paho.PahoConfiguration", "configurationField":
"configuration", "description": "Sets the HostnameVerifier for the SSL
connection. Note that it will be used after handshak [...]
"userName": { "kind": "property", "displayName": "User Name", "group":
"security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": true, "configurationClass":
"org.apache.camel.component.paho.PahoConfiguration", "configurationField":
"configuration", "description": "Username to be used for authentication against
the MQTT broker" }
},
+ "headers": {
+ "CamelMqttTopic": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The name of the topic." },
+ "CamelMqttQoS": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "Integer",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The quality of service of the incoming message." },
+ "CamelPahoQos": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Integer",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The client quality of service level (0-2)." },
+ "CamelPahoRetained": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "Boolean",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Retain option." },
+ "CamelPahoOverrideTopic": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The name of topic to override and send to instead of
topic specified on endpoint." }
+ },
"properties": {
"topic": { "kind": "path", "displayName": "Topic", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Name of the topic" },
"automaticReconnect": { "kind": "parameter", "displayName": "Automatic
Reconnect", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.paho.PahoConfiguration", "configurationField":
"configuration", "description": "Sets whether the client will automatically
attempt to reconnect to the server if the connection is los [...]
diff --git a/components/camel-paho/src/main/docs/paho-component.adoc
b/components/camel-paho/src/main/docs/paho-component.adoc
index 7c9eaf49bba..c4550beb067 100644
--- a/components/camel-paho/src/main/docs/paho-component.adoc
+++ b/components/camel-paho/src/main/docs/paho-component.adoc
@@ -53,25 +53,14 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: START
// endpoint options: END
-
-
-== Headers
-
-The following headers are recognized by the Paho component:
-
-[width="100%",cols="10%,10%,10%,10%,60%",options="header",]
-|===
-|Header |Java constant |Endpoint type |Value type |Description
-
-|CamelMqttTopic |PahoConstants.MQTT_TOPIC |Consumer |String |The name of the
topic
-|CamelMqttQoS |PahoConstants.MQTT_QOS |Consumer |Integer |QualityOfService of
the incoming message
-|CamelPahoOverrideTopic |PahoConstants.CAMEL_PAHO_OVERRIDE_TOPIC |Producer
|String |Name of topic to override and send to instead of topic specified on
endpoint
-|===
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
== Default payload type
-By default Camel Paho component operates on the binary payloads
+By default, Camel Paho component operates on the binary payloads
extracted out of (or put into) the MQTT message:
[source,java]
diff --git
a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoConstants.java
b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoConstants.java
index 0287add3f56..3393888cd96 100644
---
a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoConstants.java
+++
b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoConstants.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.paho;
+import org.apache.camel.spi.Metadata;
+
/**
* Constants to use when working with Paho component.
*/
@@ -24,10 +26,12 @@ public final class PahoConstants {
/**
* Header indicating a topic of a MQTT message.
*/
+ @Metadata(label = "consumer", description = "The name of the topic.",
javaType = "String")
public static final String MQTT_TOPIC = "CamelMqttTopic";
/**
* Header indicating a QoS of a MQTT message.
*/
+ @Metadata(label = "consumer", description = "The quality of service of the
incoming message.", javaType = "Integer")
public static final String MQTT_QOS = "CamelMqttQoS";
public static final String DEFAULT_BROKER_URL = "tcp://localhost:1883";
@@ -36,8 +40,13 @@ public final class PahoConstants {
@Deprecated
public static final String HEADER_ORIGINAL_MESSAGE = "PahoOriginalMessage";
public static final String CAMEL_PAHO = "CamelPaho";
+ @Metadata(label = "producer", description = "The client quality of service
level (0-2).", javaType = "Integer")
public static final String CAMEL_PAHO_MSG_QOS = CAMEL_PAHO + "Qos";
+ @Metadata(label = "producer", description = "Retain option.", javaType =
"Boolean")
public static final String CAMEL_PAHO_MSG_RETAINED = CAMEL_PAHO +
"Retained";
+ @Metadata(label = "producer",
+ description = "The name of topic to override and send to instead
of topic specified on endpoint.",
+ javaType = "String")
public static final String CAMEL_PAHO_OVERRIDE_TOPIC = CAMEL_PAHO +
"OverrideTopic";
private PahoConstants() {
diff --git
a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java
b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java
index d8852046e40..8c8fc9a64cb 100644
---
a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java
+++
b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java
@@ -36,7 +36,7 @@ import
org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence;
* Communicate with MQTT message brokers using Eclipse Paho MQTT Client.
*/
@UriEndpoint(firstVersion = "2.16.0", scheme = "paho", title = "Paho",
category = { Category.MESSAGING, Category.IOT },
- syntax = "paho:topic")
+ syntax = "paho:topic", headersClass = PahoConstants.class)
public class PahoEndpoint extends DefaultEndpoint {
// Configuration members
diff --git
a/components/camel-pdf/src/generated/resources/org/apache/camel/component/pdf/pdf.json
b/components/camel-pdf/src/generated/resources/org/apache/camel/component/pdf/pdf.json
index e0d85d8b0a2..2bed8c0cf41 100644
---
a/components/camel-pdf/src/generated/resources/org/apache/camel/component/pdf/pdf.json
+++
b/components/camel-pdf/src/generated/resources/org/apache/camel/component/pdf/pdf.json
@@ -25,6 +25,11 @@
"lazyStartProducer": { "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 fail during star [...]
"autowiredEnabled": { "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 type, which t [...]
},
+ "headers": {
+ "protection-policy": { "kind": "header", "displayName": "", "group":
"producer", "label": "", "required": false, "javaType":
"org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description":
"Expected type is
https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.htmlProtectionPolicy.
If specified then PDF document will be encrypted with it." },
+ "pdf-document": { "kind": "header", "displayName": "", "group":
"producer", "label": "", "required": false, "javaType":
"org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "deprecationNote":
"", "autowired": false, "secret": false, "description": "Mandatory header for
append operation and ignored in all other operations. Expected type is
https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.htmlPDDocument.
Stores PDF document which wil [...]
+ "decryption-material": { "kind": "header", "displayName": "", "group":
"producer", "label": "", "required": false, "javaType":
"org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description":
"Expected type is
https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.htmlDecryptionMaterial.
Mandatory header if PDF document is encrypted." }
+ },
"properties": {
"operation": { "kind": "path", "displayName": "Operation", "group":
"producer", "label": "", "required": true, "type": "object", "javaType":
"org.apache.camel.component.pdf.PdfOperation", "enum": [ "create", "append",
"extractText" ], "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.pdf.PdfConfiguration", "configurationField":
"pdfConfiguration", "description": "Operation type" },
"font": { "kind": "parameter", "displayName": "Font", "group": "producer",
"label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "enum": [ "Courier", "Courier-Bold", "Courier-Oblique",
"Courier-BoldOblique", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique",
"Helvetica-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic",
"Times-BoldItalic", "Symbol", "ZapfDingbats" ], "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "Helveti [...]
diff --git a/components/camel-pdf/src/main/docs/pdf-component.adoc
b/components/camel-pdf/src/main/docs/pdf-component.adoc
index c1821c8652c..14129dfa63a 100644
--- a/components/camel-pdf/src/main/docs/pdf-component.adoc
+++ b/components/camel-pdf/src/main/docs/pdf-component.adoc
@@ -54,26 +54,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
-
-== Headers
-[width="100%",cols="10%,90%",options="header",]
-|=======================================================================
-|Header |Description
-
-|`pdf-document` |*Mandatory* header for `append` operation and ignored in all
other
-operations. Expected type is
-https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/PDDocument.html[PDDocument].
-Stores PDF document which will be used for append operation.
-
-|`protection-policy` |Expected type is
-https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/ProtectionPolicy.html[ProtectionPolicy].
-If specified then PDF document will be encrypted with it.
-
-|`decryption-material` |Expected type is
-https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial].
-*Mandatory* header if PDF document is encrypted.
-|=======================================================================
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java
index a46b39d14fd..b9c727e96f3 100644
---
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java
+++
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java
@@ -29,7 +29,8 @@ import org.apache.camel.support.DefaultEndpoint;
* Create, modify or extract content from PDF documents.
*/
@UriEndpoint(firstVersion = "2.16.0", scheme = "pdf", title = "PDF", syntax =
"pdf:operation", producerOnly = true,
- category = { Category.DOCUMENT, Category.TRANSFORMATION,
Category.PRINTING })
+ category = { Category.DOCUMENT, Category.TRANSFORMATION,
Category.PRINTING },
+ headersClass = PdfHeaderConstants.class)
public class PdfEndpoint extends DefaultEndpoint {
@UriParam
diff --git
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java
index e4bf7361f90..25dfc3dbb53 100644
---
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java
+++
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java
@@ -16,9 +16,27 @@
*/
package org.apache.camel.component.pdf;
+import org.apache.camel.spi.Metadata;
+
public final class PdfHeaderConstants {
+ @Metadata(description = "Expected type is\n" +
+
"https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/ProtectionPolicy.html[ProtectionPolicy].\n"
+ +
+ "If specified then PDF document will be encrypted
with it.",
+ javaType =
"org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy")
public static final String PROTECTION_POLICY_HEADER_NAME =
"protection-policy";
+ @Metadata(description = "*Mandatory* header for `append` operation and
ignored in all other\n" +
+ "operations. Expected type is\n" +
+
"https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/PDDocument.html[PDDocument].\n"
+ +
+ "Stores PDF document which will be used for append
operation.",
+ javaType = "org.apache.pdfbox.pdmodel.PDDocument")
public static final String PDF_DOCUMENT_HEADER_NAME = "pdf-document";
+ @Metadata(description = "Expected type is\n" +
+
"https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial].\n"
+ +
+ "*Mandatory* header if PDF document is encrypted.",
+ javaType =
"org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial")
public static final String DECRYPTION_MATERIAL_HEADER_NAME =
"decryption-material";
private PdfHeaderConstants() {
diff --git
a/components/camel-pgevent/src/generated/resources/org/apache/camel/component/pgevent/pgevent.json
b/components/camel-pgevent/src/generated/resources/org/apache/camel/component/pgevent/pgevent.json
index c7126a8ff07..bb9af110968 100644
---
a/components/camel-pgevent/src/generated/resources/org/apache/camel/component/pgevent/pgevent.json
+++
b/components/camel-pgevent/src/generated/resources/org/apache/camel/component/pgevent/pgevent.json
@@ -26,6 +26,9 @@
"lazyStartProducer": { "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 fail during star [...]
"autowiredEnabled": { "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 type, which t [...]
},
+ "headers": {
+ "channel": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The name of the channel." }
+ },
"properties": {
"host": { "kind": "path", "displayName": "Host", "group": "common",
"label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "localhost", "description": "To connect using hostname and port
to the database." },
"port": { "kind": "path", "displayName": "Port", "group": "common",
"label": "", "required": false, "type": "integer", "javaType":
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "5432", "description": "To connect using hostname and port to
the database." },
diff --git a/components/camel-pgevent/src/main/docs/pgevent-component.adoc
b/components/camel-pgevent/src/main/docs/pgevent-component.adoc
index db6885b4680..31d08a4edf1 100644
--- a/components/camel-pgevent/src/main/docs/pgevent-component.adoc
+++ b/components/camel-pgevent/src/main/docs/pgevent-component.adoc
@@ -54,6 +54,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
== Common problems
@@ -62,7 +65,4 @@ Using the driver provided by PostgreSQL itself
(`jdbc:postgresql:/...`) when usi
Please use the pgjdbc-ng driver (`jdbc:pgsql:/...`) instead.
-
-
-
include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConstants.java
similarity index 70%
copy from
components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
copy to
components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConstants.java
index 6f834622ace..86fab218e4f 100644
---
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
+++
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConstants.java
@@ -14,11 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.pubnub;
+package org.apache.camel.component.pgevent;
-public abstract class PubNubConstants {
- public static final String OPERATION = "CamelPubNubOperation";
- public static final String TIMETOKEN = "CamelPubNubTimeToken";
- public static final String CHANNEL = "CamelPubNubChannel";
- public static final String UUID = "CamelPubNubUUID";
+import org.apache.camel.spi.Metadata;
+
+public final class PgEventConstants {
+
+ @Metadata(label = "consumer", description = "The name of the channel.",
javaType = "String")
+ public static final String HEADER_CHANNEL = "channel";
+
+ private PgEventConstants() {
+
+ }
}
diff --git
a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConsumer.java
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConsumer.java
index aebe8e39f92..e0ce6dfe92e 100644
---
a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConsumer.java
+++
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventConsumer.java
@@ -61,7 +61,7 @@ public class PgEventConsumer extends DefaultConsumer
implements PGNotificationLi
Exchange exchange = createExchange(false);
Message msg = exchange.getIn();
- msg.setHeader("channel", channel);
+ msg.setHeader(PgEventConstants.HEADER_CHANNEL, channel);
msg.setBody(payload);
try {
diff --git
a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java
index 6ebad1f1fa0..1f0d672e34a 100644
---
a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java
+++
b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
*/
@UriEndpoint(firstVersion = "2.15.0", scheme = "pgevent", title = "PostgresSQL
Event",
syntax = "pgevent:host:port/database/channel",
- category = { Category.DATABASE, Category.SQL })
+ category = { Category.DATABASE, Category.SQL }, headersClass =
PgEventConstants.class)
public class PgEventEndpoint extends DefaultEndpoint {
private static final Logger LOG =
LoggerFactory.getLogger(PgEventEndpoint.class);
diff --git
a/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
b/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
index acd7f4aeaee..e5418ca2bff 100644
---
a/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
+++
b/components/camel-printer/src/generated/resources/org/apache/camel/component/printer/lpr.json
@@ -25,6 +25,9 @@
"lazyStartProducer": { "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 fail during star [...]
"autowiredEnabled": { "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 type, which t [...]
},
+ "headers": {
+ "PrinterJobName": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The name of the job" }
+ },
"properties": {
"hostname": { "kind": "path", "displayName": "Hostname", "group":
"producer", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.printer.PrinterConfiguration",
"configurationField": "config", "description": "Hostname of the printer" },
"port": { "kind": "path", "displayName": "Port", "group": "producer",
"label": "", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.printer.PrinterConfiguration",
"configurationField": "config", "description": "Port number of the printer" },
diff --git a/components/camel-printer/src/main/docs/lpr-component.adoc
b/components/camel-printer/src/main/docs/lpr-component.adoc
index 01665599d46..5c2a0f50a74 100644
--- a/components/camel-printer/src/main/docs/lpr-component.adoc
+++ b/components/camel-printer/src/main/docs/lpr-component.adoc
@@ -59,7 +59,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: START
// endpoint options: END
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
== Sending Messages to a Printer
@@ -77,7 +79,7 @@ route.
-----------------------------------------------
RouteBuilder builder = new RouteBuilder() {
public void configure() {
- from(file://inputdir/?delete=true)
+ from("file://inputdir/?delete=true")
.to("lpr://localhost/default?copies=2" +
"&flavor=DocFlavor.INPUT_STREAM&" +
"&mimeType=AUTOSENSE" +
@@ -92,7 +94,7 @@ RouteBuilder builder = new RouteBuilder() {
--------------------------------------------------
RouteBuilder builder = new RouteBuilder() {
public void configure() {
- from(file://inputdir/?delete=true)
+ from("file://inputdir/?delete=true")
.to("lpr://remotehost/sales/salesprinter" +
"?copies=2&sides=one-sided" +
"&mimeType=GIF&mediaSize=ISO_A4" +
@@ -106,7 +108,7 @@ RouteBuilder builder = new RouteBuilder() {
--------------------------------------------------
RouteBuilder builder = new RouteBuilder() {
public void configure() {
- from(file://inputdir/?delete=true)
+ from("file://inputdir/?delete=true")
.to("lpr://remotehost/sales/salesprinter" +
"?copies=2&sides=one-sided" +
"&mimeType=JPEG" +
diff --git
a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java
b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java
index 5292f331957..1fb042a23a4 100644
---
a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java
+++
b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterEndpoint.java
@@ -21,6 +21,7 @@ import org.apache.camel.Component;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
+import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.support.DefaultEndpoint;
@@ -35,9 +36,10 @@ import org.apache.camel.support.DefaultEndpoint;
* printer using the javax printing API under the covers.
*/
@UriEndpoint(firstVersion = "2.1.0", scheme = "lpr", title = "Printer", syntax
= "lpr:hostname:port/printername",
- producerOnly = true, category = { Category.PRINTING })
+ producerOnly = true, category = { Category.PRINTING },
headersClass = PrinterEndpoint.class)
public class PrinterEndpoint extends DefaultEndpoint {
+ @Metadata(label = "producer", description = "The name of the job",
javaType = "String")
public static final String JOB_NAME = "PrinterJobName";
@UriParam
diff --git
a/components/camel-pubnub/src/generated/resources/org/apache/camel/component/pubnub/pubnub.json
b/components/camel-pubnub/src/generated/resources/org/apache/camel/component/pubnub/pubnub.json
index 05dd87709be..4cf474fdca0 100644
---
a/components/camel-pubnub/src/generated/resources/org/apache/camel/component/pubnub/pubnub.json
+++
b/components/camel-pubnub/src/generated/resources/org/apache/camel/component/pubnub/pubnub.json
@@ -36,6 +36,12 @@
"secure": { "kind": "property", "displayName": "Secure", "group":
"security", "label": "security", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.pubnub.PubNubConfiguration", "configurationField":
"configuration", "description": "Use SSL for secure transmission." },
"subscribeKey": { "kind": "property", "displayName": "Subscribe Key",
"group": "security", "label": "security", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": true, "configurationClass":
"org.apache.camel.component.pubnub.PubNubConfiguration", "configurationField":
"configuration", "description": "The subscribe key obtained from your PubNub
account. Required when subscribing to channels or listening for presence [...]
},
+ "headers": {
+ "CamelPubNubOperation": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The operation to perform." },
+ "CamelPubNubTimeToken": { "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "Long", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The Timestamp for the event." },
+ "CamelPubNubChannel": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The channel for which the message belongs." },
+ "CamelPubNubUUID": { "kind": "header", "displayName": "", "group":
"producer", "label": "producer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "UUID to be used as a device identifier." }
+ },
"properties": {
"channel": { "kind": "path", "displayName": "Channel", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.pubnub.PubNubConfiguration", "configurationField":
"configuration", "description": "The channel used for subscribing\/publishing
events" },
"uuid": { "kind": "parameter", "displayName": "Uuid", "group": "common",
"label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.pubnub.PubNubConfiguration",
"configurationField": "configuration", "description": "UUID to be used as a
device identifier, a default UUID is generated if not passed." },
diff --git a/components/camel-pubnub/src/main/docs/pubnub-component.adoc
b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
index d92b4bded0a..f6bb8da94f3 100644
--- a/components/camel-pubnub/src/main/docs/pubnub-component.adoc
+++ b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
@@ -58,17 +58,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: START
// endpoint options: END
-
-
-== Message headers when subscribing
-
-[width="100%",cols="20%,80%",options="header",]
-|=======================================================================
-|Name |Description
-|`CamelPubNubTimeToken` |The Timestamp for the event.
-|`CamelPubNubChannel` |The channel for which the message belongs.
-|=======================================================================
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
== Message body
diff --git
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
index 6f834622ace..8af38832d9c 100644
---
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
+++
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConstants.java
@@ -16,9 +16,15 @@
*/
package org.apache.camel.component.pubnub;
+import org.apache.camel.spi.Metadata;
+
public abstract class PubNubConstants {
+ @Metadata(label = "producer", description = "The operation to perform.",
javaType = "String")
public static final String OPERATION = "CamelPubNubOperation";
+ @Metadata(description = "The Timestamp for the event.", javaType = "Long")
public static final String TIMETOKEN = "CamelPubNubTimeToken";
+ @Metadata(label = "consumer", description = "The channel for which the
message belongs.", javaType = "String")
public static final String CHANNEL = "CamelPubNubChannel";
+ @Metadata(label = "producer", description = "UUID to be used as a device
identifier.", javaType = "String")
public static final String UUID = "CamelPubNubUUID";
}
diff --git
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
index 8bd06acebb5..8912e0da27f 100644
---
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
+++
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.util.ObjectHelper;
* Send and receive messages to/from PubNub data stream network for connected
devices.
*/
@UriEndpoint(firstVersion = "2.19.0", scheme = "pubnub", title = "PubNub",
syntax = "pubnub:channel",
- category = { Category.CLOUD, Category.IOT, Category.MESSAGING })
+ category = { Category.CLOUD, Category.IOT, Category.MESSAGING },
headersClass = PubNubConstants.class)
public class PubNubEndpoint extends DefaultEndpoint {
@UriParam(label = "advanced")
diff --git
a/components/camel-pulsar/src/generated/resources/org/apache/camel/component/pulsar/pulsar.json
b/components/camel-pulsar/src/generated/resources/org/apache/camel/component/pulsar/pulsar.json
index c906ce93808..ba2c1bcf854 100644
---
a/components/camel-pulsar/src/generated/resources/org/apache/camel/component/pulsar/pulsar.json
+++
b/components/camel-pulsar/src/generated/resources/org/apache/camel/component/pulsar/pulsar.json
@@ -64,6 +64,22 @@
"autowiredEnabled": { "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 type, which t [...]
"pulsarClient": { "kind": "property", "displayName": "Pulsar Client",
"group": "advanced", "label": "advanced", "required": false, "type": "object",
"javaType": "org.apache.pulsar.client.api.PulsarClient", "deprecated": false,
"autowired": true, "secret": false, "description": "The pulsar client" }
},
+ "headers": {
+ "properties": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "Map<String, String>",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The properties attached to the message." },
+ "producer_name": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The producer name who produced the message." },
+ "sequence_id": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "long", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The sequence id associated with the message." },
+ "publish_time": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType": "long",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The publish time of the message." },
+ "message_id": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType":
"org.apache.pulsar.client.api.MessageId", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
unique message ID associated with the message." },
+ "event_time": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "long", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The event time associated with the message." },
+ "key": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The key of the message." },
+ "key_bytes": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "byte[]", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The bytes in key." },
+ "topic_name": { "kind": "header", "displayName": "", "group": "consumer",
"label": "consumer", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The topic the message was published to." },
+ "message_receipt": { "kind": "header", "displayName": "", "group":
"consumer", "label": "consumer", "required": false, "javaType":
"org.apache.camel.component.pulsar.PulsarMessageReceipt", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
message receipt." },
+ "CamelPulsarProducerMessageKey": { "kind": "header", "displayName": "",
"group": "producer", "label": "producer", "required": false, "javaType":
"String", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The key of the message for routing policy." },
+ "CamelPulsarProducerMessageProperties": { "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The properties of the message to add."
},
+ "CamelPulsarProducerMessageEventTime": { "kind": "header", "displayName":
"", "group": "producer", "label": "producer", "required": false, "javaType":
"Long", "deprecated": false, "deprecationNote": "", "autowired": false,
"secret": false, "description": "The event time of the message message." },
+ "CamelPulsarRedeliveryCount": { "kind": "header", "displayName": "",
"group": "consumer", "label": "consumer", "required": false, "javaType": "int",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The message redelivery count, redelivery count maintain
in pulsar broker." }
+ },
"properties": {
"persistence": { "kind": "path", "displayName": "Persistence", "group":
"common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "enum": [ "persistent", "non-persistent" ], "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "Whether the topic is persistent or non-persistent" },
"tenant": { "kind": "path", "displayName": "Tenant", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The tenant" },
diff --git a/components/camel-pulsar/src/main/docs/pulsar-component.adoc
b/components/camel-pulsar/src/main/docs/pulsar-component.adoc
index 21b4c85086d..b278dc4cd54 100644
--- a/components/camel-pulsar/src/main/docs/pulsar-component.adoc
+++ b/components/camel-pulsar/src/main/docs/pulsar-component.adoc
@@ -44,7 +44,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: START
// endpoint options: END
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarEndpoint.java
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarEndpoint.java
index ceba2ef4da8..131cece023c 100644
---
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarEndpoint.java
+++
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarEndpoint.java
@@ -20,6 +20,7 @@ import org.apache.camel.Category;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
+import org.apache.camel.component.pulsar.utils.message.PulsarMessageHeaders;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
@@ -33,7 +34,8 @@ import org.apache.pulsar.client.api.PulsarClient;
* Send and receive messages from/to Apache Pulsar messaging system.
*/
@UriEndpoint(scheme = "pulsar", firstVersion = "2.24.0", title = "Pulsar",
- syntax = "pulsar:persistence://tenant/namespace/topic", category
= { Category.MESSAGING })
+ syntax = "pulsar:persistence://tenant/namespace/topic", category
= { Category.MESSAGING },
+ headersClass = PulsarMessageHeaders.class)
public class PulsarEndpoint extends DefaultEndpoint {
private PulsarClient pulsarClient;
diff --git
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarProducer.java
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarProducer.java
index 054868f85a6..52dcdc14dfb 100644
---
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarProducer.java
+++
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarProducer.java
@@ -56,7 +56,7 @@ public class PulsarProducer extends DefaultProducer {
body = exchange.getContext().getTypeConverter()
.mandatoryConvertTo(byte[].class, exchange,
message.getBody());
} catch (NoTypeConversionAvailableException | TypeConversionException
exception) {
- // fallback to try serialize the data
+ // fallback to try to serialize the data
body = PulsarMessageUtils.serialize(message.getBody());
}
messageBuilder.value(body);
diff --git
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/message/PulsarMessageHeaders.java
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/message/PulsarMessageHeaders.java
index bf65ab1c4b1..204fd8e1c65 100644
---
a/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/message/PulsarMessageHeaders.java
+++
b/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/message/PulsarMessageHeaders.java
@@ -16,20 +16,39 @@
*/
package org.apache.camel.component.pulsar.utils.message;
+import org.apache.camel.spi.Metadata;
+
public interface PulsarMessageHeaders {
+ @Metadata(label = "consumer", description = "The properties attached to
the message.", javaType = "Map<String, String>")
String PROPERTIES = "properties";
+ @Metadata(label = "consumer", description = "The producer name who
produced the message.", javaType = "String")
String PRODUCER_NAME = "producer_name";
+ @Metadata(label = "consumer", description = "The sequence id associated
with the message.", javaType = "long")
String SEQUENCE_ID = "sequence_id";
+ @Metadata(label = "consumer", description = "The publish time of the
message.", javaType = "long")
String PUBLISH_TIME = "publish_time";
+ @Metadata(label = "consumer", description = "The unique message ID
associated with the message.",
+ javaType = "org.apache.pulsar.client.api.MessageId")
String MESSAGE_ID = "message_id";
+ @Metadata(label = "consumer", description = "The event time associated
with the message.", javaType = "long")
String EVENT_TIME = "event_time";
+ @Metadata(label = "consumer", description = "The key of the message.",
javaType = "String")
String KEY = "key";
+ @Metadata(label = "consumer", description = "The bytes in key.", javaType
= "byte[]")
String KEY_BYTES = "key_bytes";
+ @Metadata(label = "consumer", description = "The topic the message was
published to.", javaType = "String")
String TOPIC_NAME = "topic_name";
+ @Metadata(label = "consumer", description = "The message receipt.",
+ javaType =
"org.apache.camel.component.pulsar.PulsarMessageReceipt")
String MESSAGE_RECEIPT = "message_receipt";
+ @Metadata(label = "producer", description = "The key of the message for
routing policy.", javaType = "String")
String KEY_OUT = "CamelPulsarProducerMessageKey";
+ @Metadata(label = "producer", description = "The properties of the message
to add.", javaType = "Map<String, String>")
String PROPERTIES_OUT = "CamelPulsarProducerMessageProperties";
+ @Metadata(label = "producer", description = "The event time of the message
message.", javaType = "Long")
String EVENT_TIME_OUT = "CamelPulsarProducerMessageEventTime";
+ @Metadata(label = "consumer", description = "The message redelivery count,
redelivery count maintain in pulsar broker.",
+ javaType = "int")
String PULSAR_REDELIVERY_COUNT = "CamelPulsarRedeliveryCount";
}
diff --git
a/components/camel-quickfix/src/generated/resources/org/apache/camel/component/quickfixj/quickfix.json
b/components/camel-quickfix/src/generated/resources/org/apache/camel/component/quickfixj/quickfix.json
index 6eeedc02861..3dd5bfd91e7 100644
---
a/components/camel-quickfix/src/generated/resources/org/apache/camel/component/quickfixj/quickfix.json
+++
b/components/camel-quickfix/src/generated/resources/org/apache/camel/component/quickfixj/quickfix.json
@@ -31,6 +31,11 @@
"messageFactory": { "kind": "property", "displayName": "Message Factory",
"group": "advanced", "label": "advanced", "required": false, "type": "object",
"javaType": "quickfix.MessageFactory", "deprecated": false, "autowired": false,
"secret": false, "description": "To use the given MessageFactory" },
"messageStoreFactory": { "kind": "property", "displayName": "Message Store
Factory", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "quickfix.MessageStoreFactory", "deprecated": false,
"autowired": false, "secret": false, "description": "To use the given
MessageStoreFactory" }
},
+ "headers": {
+ "EventCategory": { "kind": "header", "displayName": "", "group": "common",
"label": "", "required": false, "javaType":
"org.apache.camel.component.quickfixj.QuickfixjEventCategory", "enum": [
"AppMessageReceived", "AppMessageSent", "AdminMessageReceived",
"AdminMessageSent", "SessionCreated", "SessionLogon", "SessionLogoff" ],
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The event category." },
+ "SessionID": { "kind": "header", "displayName": "", "group": "common",
"label": "", "required": false, "javaType": "quickfix.SessionID", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The FIX message SessionID." },
+ "MessageType": { "kind": "header", "displayName": "", "group": "common",
"label": "", "required": false, "javaType": "String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
FIX MsgType tag value." }
+ },
"properties": {
"configurationName": { "kind": "path", "displayName": "Configuration
Name", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "Path to the quickfix
configuration file. You can prefix with: classpath, file, http, ref, or bean.
classpath, file and http loads the configuration file using these protocols
(classpath is default). ref will lookup [...]
"lazyCreateEngine": { "kind": "parameter", "displayName": "Lazy Create
Engine", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "This option allows creating
QuickFIX\/J engine on demand. Value true means the engine is started when first
message is send or there's consumer configured in route definition. When false
value is used, the engine is st [...]
diff --git a/components/camel-quickfix/src/main/docs/quickfix-component.adoc
b/components/camel-quickfix/src/main/docs/quickfix-component.adoc
index 57d56363a18..0cb2f36fb78 100644
--- a/components/camel-quickfix/src/main/docs/quickfix-component.adoc
+++ b/components/camel-quickfix/src/main/docs/quickfix-component.adoc
@@ -93,28 +93,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
-
-== Exchange Format
-
-The exchange headers include information to help with exchange
-filtering, routing and other processing. The following headers are
-available:
-
-[width="100%",cols="10%,90%",options="header",]
-|=======================================================================
-|Header Name |Description
-|EventCategory |One of `AppMessageReceived`, `AppMessageSent`,
-`AdminMessageReceived`, `AdminMessageSent`, `SessionCreated`,
-`SessionLogon`, `SessionLogoff`. See the `QuickfixjEventCategory` enum.
-
-|SessionID |The FIX message SessionID
-
-|MessageType |The FIX MsgType tag value
-
-|DataDictionary |Specifies a data dictionary to used for parsing an
-incoming message. Can be an instance of a data dictionary or a resource
-path for a QuickFIX/J data dictionary file
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
The DataDictionary header is useful if string messages are being
received and need to be parsed in a route. QuickFIX/J requires a data
diff --git
a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjConsumer.java
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjConsumer.java
index d97e35d98f4..bfbb9065736 100644
---
a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjConsumer.java
+++
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjConsumer.java
@@ -73,7 +73,7 @@ public class QuickfixjConsumer extends DefaultConsumer {
LOG.debug("Sending FIX message reply: {}", quickfixjMessage);
- SessionID messageSessionID = exchange.getIn().getHeader("SessionID",
SessionID.class);
+ SessionID messageSessionID =
exchange.getIn().getHeader(QuickfixjEndpoint.SESSION_ID_KEY, SessionID.class);
Session session = getSession(messageSessionID);
if (session == null) {
diff --git
a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
index 6dc74b431be..d750ed257e0 100644
---
a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
+++
b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
@@ -43,10 +43,13 @@ import quickfix.SessionID;
* Open a Financial Interchange (FIX) session using an embedded QuickFix/J
engine.
*/
@UriEndpoint(firstVersion = "2.1.0", scheme = "quickfix", title = "QuickFix",
syntax = "quickfix:configurationName",
- category = { Category.MESSAGING })
+ category = { Category.MESSAGING }, headersClass =
QuickfixjEndpoint.class)
public class QuickfixjEndpoint extends DefaultEndpoint implements
QuickfixjEventListener, MultipleConsumersSupport {
+ @Metadata(description = "The event category.", javaType =
"org.apache.camel.component.quickfixj.QuickfixjEventCategory")
public static final String EVENT_CATEGORY_KEY = "EventCategory";
+ @Metadata(description = "The FIX message SessionID.", javaType =
"quickfix.SessionID")
public static final String SESSION_ID_KEY = "SessionID";
+ @Metadata(description = "The FIX MsgType tag value.", javaType = "String")
public static final String MESSAGE_TYPE_KEY = "MessageType";
public static final String DATA_DICTIONARY_KEY = "DataDictionary";