JCache
Put, get and remove the entries of a JSR-107 (JCache) cache, and receive its cache entry events.
What’s inside
-
JCache component, URI syntax:
jcache:cacheName
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-jcache-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 9 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.jcache.autowired-enabled | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.jcache.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.jcache.cache-configuration | The default JCache Configuration of the endpoints, to create a cache with when it does not exist yet. When set, the cache options of the endpoint (such as readThrough and expiryPolicyFactory) are not used. The option is a javax.cache.configuration.Configuration type. | Configuration | |
camel.component.jcache.cache-configuration-properties | The default provider specific properties of the endpoints, which the CachingProvider gets when it creates the CacheManager. The provider creates one CacheManager per configurationUri and reuses it, so only the properties of the first use count. Takes precedence over cacheConfigurationPropertiesRef. | Map | |
camel.component.jcache.cache-configuration-properties-ref | The name of a Map or Properties bean in the registry to use as cacheConfigurationProperties, when that option is not set. | String | |
camel.component.jcache.caching-provider | The default JCache CachingProvider of the endpoints: the fully qualified class name of a javax.cache.spi.CachingProvider, or one of the short names hazelcast, ehcache, caffeine and infinispan-embedded. When not set, the provider named by the javax.cache.spi.CachingProvider system property is used, or else the only CachingProvider on the classpath (it fails when there is none or more than one). | String | |
camel.component.jcache.configuration-uri | The default implementation specific URI of the CacheManager of the endpoints, such as the location of a configuration file of the provider. Property placeholders are resolved. When not set, the default URI of the provider is used. | String | |
camel.component.jcache.enabled | Whether to enable auto configuration of the jcache component. This is enabled by default. | Boolean | |
camel.component.jcache.lazy-start-producer | 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. | false | Boolean |