Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eventTypes": { "index": 5, "kind": "property", "displayName": "Event Types", "group": "consumer", "label": "consumer", "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": "Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED" },
"sync": { "index": 6, "kind": "property", "displayName": "Sync", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "If true, the consumer will receive notifications synchronously" },
"defaultValue": { "index": 7, "kind": "property", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" },
"key": { "index": 8, "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" },
"key": { "index": 8, "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations. When set, it takes precedence over the CamelInfinispanKey header." },
"lazyStartProducer": { "index": 9, "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
"oldValue": { "index": 10, "kind": "property", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" },
"operation": { "index": 11, "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "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": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
Expand Down Expand Up @@ -80,7 +80,7 @@
"exceptionHandler": { "index": 7, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." },
"exchangePattern": { "index": 8, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
"defaultValue": { "index": 9, "kind": "parameter", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" },
"key": { "index": 10, "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" },
"key": { "index": 10, "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations. When set, it takes precedence over the CamelInfinispanKey header." },
"oldValue": { "index": 11, "kind": "parameter", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" },
"operation": { "index": 12, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "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": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
"value": { "index": 13, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"customListener": { "index": 4, "kind": "property", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" },
"eventTypes": { "index": 5, "kind": "property", "displayName": "Event Types", "group": "consumer", "label": "consumer", "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 set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER" },
"defaultValue": { "index": 6, "kind": "property", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" },
"key": { "index": 7, "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" },
"key": { "index": 7, "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations. When set, it takes precedence over the CamelInfinispanKey header." },
"lazyStartProducer": { "index": 8, "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 starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
"oldValue": { "index": 9, "kind": "property", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" },
"operation": { "index": 10, "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "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": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
Expand Down Expand Up @@ -88,7 +88,7 @@
"exceptionHandler": { "index": 6, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." },
"exchangePattern": { "index": 7, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
"defaultValue": { "index": 8, "kind": "parameter", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" },
"key": { "index": 9, "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" },
"key": { "index": 9, "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations. When set, it takes precedence over the CamelInfinispanKey header." },
"oldValue": { "index": 10, "kind": "parameter", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" },
"operation": { "index": 11, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "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": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
"value": { "index": 12, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,25 @@ The resulting value is returned in the exchange *body*.
Write methods like put(key, value) and remove(key) do not return the previous value by default.
====

=== Key and cache name headers

The `key` option of the endpoint takes precedence over the `CamelInfinispanKey` header. When the endpoint does not set
`key`, the producer uses the `CamelInfinispanKey` header.

The `CamelInfinispanCacheName` header takes precedence over the cache name of the endpoint.

An `infinispan` consumer sets `CamelInfinispanKey` and `CamelInfinispanCacheName` to the key and the cache of the event.
When a route sends those events to an `infinispan` producer, the producer works on the cache of the event, and on the key
of the event unless the endpoint sets `key`. To use the cache and the key configured on the producer endpoint, remove
the headers first:

[source,java]
----
from("infinispan:source")
.removeHeaders("CamelInfinispan*")
.to("infinispan:target?operation=PUT&key=myKey&value=myValue");
----

== Examples

* Put a key/value into a named cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,25 @@ 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.
====

=== Key and cache name headers

The `key` option of the endpoint takes precedence over the `CamelInfinispanKey` header. When the endpoint does not set
`key`, the producer uses the `CamelInfinispanKey` header.

The `CamelInfinispanCacheName` header takes precedence over the cache name of the endpoint.

An `infinispan-embedded` consumer sets `CamelInfinispanKey` and `CamelInfinispanCacheName` to the key and the cache of the event.
When a route sends those events to an `infinispan-embedded` producer, the producer works on the cache of the event, and on the key
of the event unless the endpoint sets `key`. To use the cache and the key configured on the producer endpoint, remove
the headers first:

[source,java]
----
from("infinispan-embedded:source")
.removeHeaders("CamelInfinispan*")
.to("infinispan-embedded:target?operation=PUT&key=myKey&value=myValue");
----

== Examples

* Put a key/value into a named cache:
Expand Down
Loading
Loading