You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/03/29 16:59:51 UTC

[camel] 08/12: CAMEL-17792: Add doc about the message headers of camel-infinispan

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8cb5eb48bd7084ebb3198f7958893cad230b4053
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Tue Mar 29 17:46:18 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-infinispan
---
 .../component/infinispan/InfinispanConstants.java  | 52 ++++++++++++++++++++++
 .../infinispan/embedded/infinispan-embedded.json   | 24 ++++++++++
 .../main/docs/infinispan-embedded-component.adoc   | 23 ++--------
 .../embedded/InfinispanEmbeddedEndpoint.java       |  7 ++-
 .../component/infinispan/remote/infinispan.json    | 20 +++++++++
 .../src/main/docs/infinispan-component.adoc        | 24 ++--------
 .../remote/InfinispanRemoteEndpoint.java           |  7 ++-
 7 files changed, 113 insertions(+), 44 deletions(-)

diff --git a/components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanConstants.java b/components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanConstants.java
index b92d0f2..0b514c5 100644
--- a/components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanConstants.java
+++ b/components/camel-infinispan/camel-infinispan-common/src/main/java/org/apache/camel/component/infinispan/InfinispanConstants.java
@@ -16,32 +16,84 @@
  */
 package org.apache.camel.component.infinispan;
 
+import org.apache.camel.spi.Metadata;
+
 public interface InfinispanConstants {
 
+    String SCHEME_INFINISPAN = "infinispan";
+    String SCHEME_EMBEDDED = "infinispan-embedded";
+
     String CACHE_MANAGER_CURRENT = "current";
 
+    @Metadata(label = "consumer", description = "The type of the received event.", javaType = "String")
     String EVENT_TYPE = "CamelInfinispanEventType";
+    @Metadata(label = "consumer",
+              description = "true if the notification is before the event has occurred, false if after the event has occurred.",
+              javaType = "boolean", applicableFor = SCHEME_EMBEDDED)
     String IS_PRE = "CamelInfinispanIsPre";
+    @Metadata(description = "The cache participating in the operation or event.", javaType = "String")
     String CACHE_NAME = "CamelInfinispanCacheName";
+    @Metadata(description = "The key to perform the operation to or the key generating the event.", javaType = "Object")
     String KEY = "CamelInfinispanKey";
+    @Metadata(label = "producer", description = "The value to use for the operation.", javaType = "Object")
     String VALUE = "CamelInfinispanValue";
+    @Metadata(label = "producer", description = "The default value to use for a getOrDefault.", javaType = "Object")
     String DEFAULT_VALUE = "CamelInfinispanDefaultValue";
+    @Metadata(label = "producer", description = "The old value to use for a replace.", javaType = "Object")
     String OLD_VALUE = "CamelInfinispanOldValue";
+    @Metadata(label = "producer", description = "A Map to use in case of `CamelInfinispanOperationPutAll` operation",
+              javaType = "Map")
     String MAP = "CamelInfinispanMap";
+    @Metadata(label = "producer", description = "The operation to perform.",
+              javaType = "org.apache.camel.component.infinispan.InfinispanOperation")
     String OPERATION = "CamelInfinispanOperation";
+    @Metadata(label = "producer", description = "The name of the header whose value is the result", javaType = "String")
     String RESULT = "CamelInfinispanOperationResult";
+    @Metadata(label = "producer", description = "Store the operation result in a header instead of the message body",
+              javaType = "String")
     String RESULT_HEADER = "CamelInfinispanOperationResultHeader";
+    @Metadata(label = "producer",
+              description = "The Lifespan time of a value inside the cache. Negative values are interpreted as infinity.",
+              javaType = "long")
     String LIFESPAN_TIME = "CamelInfinispanLifespanTime";
+    @Metadata(label = "producer", description = "The Time Unit of an entry Lifespan Time.",
+              javaType = "java.util.concurrent.TimeUnit")
     String LIFESPAN_TIME_UNIT = "CamelInfinispanTimeUnit";
+    @Metadata(label = "producer",
+              description = "The maximum amount of time an entry is allowed to be idle for before it is considered as expired.",
+              javaType = "long")
     String MAX_IDLE_TIME = "CamelInfinispanMaxIdleTime";
+    @Metadata(label = "producer", description = "The Time Unit of an entry Max Idle Time.",
+              javaType = "java.util.concurrent.TimeUnit")
     String MAX_IDLE_TIME_UNIT = "CamelInfinispanMaxIdleTimeUnit";
+    @Metadata(label = "consumer",
+              description = "Signals that a write operation's return value will be ignored, so reading the existing value from a store or from a remote node is not necessary.",
+              javaType = "boolean", defaultValue = "false", applicableFor = SCHEME_EMBEDDED)
     String IGNORE_RETURN_VALUES = "CamelInfinispanIgnoreReturnValues";
+    @Metadata(label = "consumer", description = "The event data.", javaType = "Object")
     String EVENT_DATA = "CamelInfinispanEventData";
+    @Metadata(label = "producer",
+              description = "The QueryBuilder to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one",
+              javaType = "org.apache.camel.component.infinispan.InfinispanQueryBuilder")
     String QUERY_BUILDER = "CamelInfinispanQueryBuilder";
+    @Metadata(label = "consumer", description = "Provides access to the version of the created cache entry.", javaType = "long",
+              applicableFor = SCHEME_INFINISPAN)
     String ENTRY_VERSION = "CamelInfinispanEntryVersion";
+    @Metadata(label = "consumer",
+              description = "This will be true if the write command that caused this had to be retried again due to a topology change.",
+              javaType = "boolean")
     String COMMAND_RETRIED = "CamelInfinispanCommandRetried";
+    @Metadata(label = "consumer",
+              description = "Indicates whether the cache entry modification event is the result of the cache entry being created.",
+              javaType = "boolean", applicableFor = SCHEME_EMBEDDED)
     String ENTRY_CREATED = "CamelInfinispanEntryCreated";
+    @Metadata(label = "consumer",
+              description = "true if the call originated on the local cache instance; false if originated from a remote one.",
+              javaType = "boolean", applicableFor = SCHEME_EMBEDDED)
     String ORIGIN_LOCAL = "CamelInfinispanOriginLocal";
+    @Metadata(label = "consumer",
+              description = "True if this event is generated from an existing entry as the listener has Listener.",
+              javaType = "boolean", applicableFor = SCHEME_EMBEDDED)
     String CURRENT_STATE = "CamelInfinispanCurrentState";
 
     String CACHE_ENTRY_JOINING = "CacheEntryJoining";
diff --git a/components/camel-infinispan/camel-infinispan-embedded/src/generated/resources/org/apache/camel/component/infinispan/embedded/infinispan-embedded.json b/components/camel-infinispan/camel-infinispan-embedded/src/generated/resources/org/apache/camel/component/infinispan/embedded/infinispan-embedded.json
index 939dcf6..41938f0 100644
--- a/components/camel-infinispan/camel-infinispan-embedded/src/generated/resources/org/apache/camel/component/infinispan/embedded/infinispan-embedded.json
+++ b/components/camel-infinispan/camel-infinispan-embedded/src/generated/resources/org/apache/camel/component/infinispan/embedded/infinispan-embedded.json
@@ -43,6 +43,30 @@
     "remappingFunction": { "kind": "property", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." },
     "resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHead [...]
   },
+  "headers": {
+    "CamelInfinispanEventType": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the received event." },
+    "CamelInfinispanIsPre": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "true if the notification is before the event has occurred, false if after the event has occurred." },
+    "CamelInfinispanCacheName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cache participating in the operation or event." },
+    "CamelInfinispanKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key to perform the operation to or the key generating the event." },
+    "CamelInfinispanValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value to use for the operation." },
+    "CamelInfinispanDefaultValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The default value to use for a getOrDefault." },
+    "CamelInfinispanOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value to use for a replace." },
+    "CamelInfinispanMap": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A Map to use in case of `CamelInfinispanOperationPutAll` operation" },
+    "CamelInfinispanOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": [...]
+    "CamelInfinispanOperationResult": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the header whose value is the result" },
+    "CamelInfinispanOperationResultHeader": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Store the operation result in a header instead of the message body" },
+    "CamelInfinispanLifespanTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Lifespan time of a value inside the cache. Negative values are interpreted as infinity." },
+    "CamelInfinispanTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Lifespan Time." },
+    "CamelInfinispanMaxIdleTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum amount of time an entry is allowed to be idle for before it is considered as expired." },
+    "CamelInfinispanMaxIdleTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Max Idle Time." },
+    "CamelInfinispanIgnoreReturnValues": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "false", "description": "Signals that a write operation's return value will be ignored, so reading the existing value from a store or from a remote node is not necessary." },
+    "CamelInfinispanEventData": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event data." },
+    "CamelInfinispanQueryBuilder": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The QueryBuilder to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one" },
+    "CamelInfinispanCommandRetried": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This will be true if the write command that caused this had to be retried again due to a topology change." },
+    "CamelInfinispanEntryCreated": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Indicates whether the cache entry modification event is the result of the cache entry being created." },
+    "CamelInfinispanOriginLocal": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "true if the call originated on the local cache instance; false if originated from a remote one." },
+    "CamelInfinispanCurrentState": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "True if this event is generated from an existing entry as the listener has Listener." }
+  },
   "properties": {
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name." },
     "queryBuilder": { "kind": "parameter", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." },
diff --git a/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc b/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
index 13aa946..55e3aad 100644
--- a/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
+++ b/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
@@ -64,6 +64,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
 
 
 == Camel Operations
@@ -220,26 +223,6 @@ This section lists all available operations, along with their header information
 Write methods like put(key, value) and remove(key) do not return the previous value by default.
 ====
 
-== Message Headers
-
-[width="100%",cols="10%,10%,10%,10%,60%",options="header",]
-|=======================================================================
-|Name |Default Value |Type |Context |Description
-|CamelInfinispanCacheName |`null` |String |Shared |The cache participating in the operation or event.
-|CamelInfinispanOperation |`PUT` |InfinispanOperation |Producer |The operation to perform.
-|CamelInfinispanMap |`null` |Map |Producer |A Map to use in case of CamelInfinispanOperationPutAll operation
-|CamelInfinispanKey |`null` |Object |Shared |The key to perform the operation to or the key generating the event.
-|CamelInfinispanValue |`null` |Object |Producer |The value to use for the operation.
-|CamelInfinispanEventType |`null` |String |Consumer |The type of the received event.
-|CamelInfinispanLifespanTime |`null` |long |Producer |The Lifespan time of a value inside the cache. Negative values are interpreted as infinity.
-|CamelInfinispanTimeUnit |`null` |String |Producer |The Time Unit of an entry Lifespan Time.
-|CamelInfinispanMaxIdleTime |`null` |long |Producer |The maximum amount of time an entry is allowed to be idle for before it is considered as expired.
-|CamelInfinispanMaxIdleTimeUnit |`null` |String |Producer |The Time Unit of an entry Max Idle Time.
-|CamelInfinispanQueryBuilder |null |InfinispanQueryBuilder |Producer |The QueryBuilde to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one
-|CamelInfinispanOperationResultHeader |null |String |Producer |Store the operation result in a header instead of the message body
-|=======================================================================
-
-
 == Examples
 
 * Put a key/value into a named cache:
diff --git a/components/camel-infinispan/camel-infinispan-embedded/src/main/java/org/apache/camel/component/infinispan/embedded/InfinispanEmbeddedEndpoint.java b/components/camel-infinispan/camel-infinispan-embedded/src/main/java/org/apache/camel/component/infinispan/embedded/InfinispanEmbeddedEndpoint.java
index 107ee31..b16aee4 100644
--- a/components/camel-infinispan/camel-infinispan-embedded/src/main/java/org/apache/camel/component/infinispan/embedded/InfinispanEmbeddedEndpoint.java
+++ b/components/camel-infinispan/camel-infinispan-embedded/src/main/java/org/apache/camel/component/infinispan/embedded/InfinispanEmbeddedEndpoint.java
@@ -21,6 +21,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.infinispan.InfinispanComponent;
+import org.apache.camel.component.infinispan.InfinispanConstants;
 import org.apache.camel.component.infinispan.InfinispanEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
@@ -28,12 +29,14 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.service.ServiceHelper;
 
+import static org.apache.camel.component.infinispan.InfinispanConstants.SCHEME_EMBEDDED;
+
 /**
  * Read and write from/to Infinispan distributed key/value store and data grid.
  */
-@UriEndpoint(firstVersion = "2.13.0", scheme = "infinispan-embedded", title = "Infinispan Embedded",
+@UriEndpoint(firstVersion = "2.13.0", scheme = SCHEME_EMBEDDED, title = "Infinispan Embedded",
              syntax = "infinispan-embedded:cacheName",
-             category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING })
+             category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING }, headersClass = InfinispanConstants.class)
 public class InfinispanEmbeddedEndpoint extends InfinispanEndpoint {
 
     @UriPath(description = "The name of the cache to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name.")
diff --git a/components/camel-infinispan/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/remote/infinispan.json b/components/camel-infinispan/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/remote/infinispan.json
index a9dca89..13f7683 100644
--- a/components/camel-infinispan/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/remote/infinispan.json
+++ b/components/camel-infinispan/camel-infinispan/src/generated/resources/org/apache/camel/component/infinispan/remote/infinispan.json
@@ -49,6 +49,26 @@
     "remappingFunction": { "kind": "property", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." },
     "resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader = [...]
   },
+  "headers": {
+    "CamelInfinispanEventType": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the received event." },
+    "CamelInfinispanCacheName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cache participating in the operation or event." },
+    "CamelInfinispanKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key to perform the operation to or the key generating the event." },
+    "CamelInfinispanValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value to use for the operation." },
+    "CamelInfinispanDefaultValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The default value to use for a getOrDefault." },
+    "CamelInfinispanOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value to use for a replace." },
+    "CamelInfinispanMap": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A Map to use in case of `CamelInfinispanOperationPutAll` operation" },
+    "CamelInfinispanOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": [...]
+    "CamelInfinispanOperationResult": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the header whose value is the result" },
+    "CamelInfinispanOperationResultHeader": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Store the operation result in a header instead of the message body" },
+    "CamelInfinispanLifespanTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Lifespan time of a value inside the cache. Negative values are interpreted as infinity." },
+    "CamelInfinispanTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Lifespan Time." },
+    "CamelInfinispanMaxIdleTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum amount of time an entry is allowed to be idle for before it is considered as expired." },
+    "CamelInfinispanMaxIdleTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Max Idle Time." },
+    "CamelInfinispanEventData": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event data." },
+    "CamelInfinispanQueryBuilder": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The QueryBuilder to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one" },
+    "CamelInfinispanEntryVersion": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Provides access to the version of the created cache entry." },
+    "CamelInfinispanCommandRetried": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This will be true if the write command that caused this had to be retried again due to a topology change." }
+  },
   "properties": {
     "cacheName": { "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name." },
     "hosts": { "kind": "parameter", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the host of the cache on Infinispan instance" },
diff --git a/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
index e7f3980..1fb127c 100644
--- a/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -50,6 +50,10 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
 == Camel Operations
 This section lists all available operations, along with their header information.
 
@@ -204,26 +208,6 @@ This section lists all available operations, along with their header information
 Write methods like put(key, value) and remove(key) do not return the previous value by default.
 ====
 
-== Message Headers
-
-[width="100%",cols="10%,10%,10%,10%,60%",options="header",]
-|=======================================================================
-|Name |Default Value |Type |Context |Description
-|CamelInfinispanCacheName |`null` |String |Shared |The cache participating in the operation or event.
-|CamelInfinispanOperation |`PUT` |InfinispanOperation |Producer |The operation to perform.
-|CamelInfinispanMap |`null` |Map |Producer |A Map to use in case of CamelInfinispanOperationPutAll operation
-|CamelInfinispanKey |`null` |Object |Shared |The key to perform the operation to or the key generating the event.
-|CamelInfinispanValue |`null` |Object |Producer |The value to use for the operation.
-|CamelInfinispanEventType |`null` |String |Consumer |The type of the received event. 
-|CamelInfinispanLifespanTime |`null` |long |Producer |The Lifespan time of a value inside the cache. Negative values are interpreted as infinity.
-|CamelInfinispanTimeUnit |`null` |String |Producer |The Time Unit of an entry Lifespan Time.
-|CamelInfinispanMaxIdleTime |`null` |long |Producer |The maximum amount of time an entry is allowed to be idle for before it is considered as expired.
-|CamelInfinispanMaxIdleTimeUnit |`null` |String |Producer |The Time Unit of an entry Max Idle Time.
-|CamelInfinispanQueryBuilder |null |InfinispanQueryBuilder |Producer |The QueryBuilde to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one
-|CamelInfinispanOperationResultHeader |null |String |Producer |Store the operation result in a header instead of the message body
-|=======================================================================
-
-
 == Examples
 
 * Put a key/value into a named cache:
diff --git a/components/camel-infinispan/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteEndpoint.java b/components/camel-infinispan/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteEndpoint.java
index 9f360cc..c4f079a 100644
--- a/components/camel-infinispan/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteEndpoint.java
+++ b/components/camel-infinispan/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteEndpoint.java
@@ -21,6 +21,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.infinispan.InfinispanComponent;
+import org.apache.camel.component.infinispan.InfinispanConstants;
 import org.apache.camel.component.infinispan.InfinispanEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
@@ -28,11 +29,13 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.service.ServiceHelper;
 
+import static org.apache.camel.component.infinispan.InfinispanConstants.SCHEME_INFINISPAN;
+
 /**
  * Read and write from/to Infinispan distributed key/value store and data grid.
  */
-@UriEndpoint(firstVersion = "2.13.0", scheme = "infinispan", title = "Infinispan", syntax = "infinispan:cacheName",
-             category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING })
+@UriEndpoint(firstVersion = "2.13.0", scheme = SCHEME_INFINISPAN, title = "Infinispan", syntax = "infinispan:cacheName",
+             category = { Category.CACHE, Category.DATAGRID, Category.CLUSTERING }, headersClass = InfinispanConstants.class)
 public class InfinispanRemoteEndpoint extends InfinispanEndpoint {
 
     @UriPath(description = "The name of the cache to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name.")