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 @@ -175,6 +175,7 @@ ignite-set
imap
imaps
infinispan
infinispan-embedded
influxdb
iota
ipfs
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion components-starter/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Apache Camel Spring Boot supports the following Camel artifacts as Spring Boot S
== Camel Components

// components: START
Number of Camel components: 343 in 276 JAR artifacts (3 deprecated)
Number of Camel components: 344 in 277 JAR artifacts (3 deprecated)

[width="100%",cols="4,3,3,3,6",options="header"]
|===
Expand Down Expand Up @@ -347,6 +347,8 @@ Number of Camel components: 343 in 276 JAR artifacts (3 deprecated)

| xref:latest@components::infinispan-component.adoc[Infinispan] | camel-infinispan-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid.

| xref:latest@components::infinispan-embedded-component.adoc[Infinispan Embedded] | camel-infinispan-embedded-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid.

| xref:latest@components::influxdb-component.adoc[InfluxDB] | camel-influxdb-starter | Stable | 2.18 | Interact with InfluxDB, a time series database.

| xref:latest@components::iota-component.adoc[IOTA] | camel-iota-starter | Stable | 2.23 | Manage financial transactions using IOTA distributed ledger.
Expand Down
53 changes: 53 additions & 0 deletions components-starter/camel-infinispan-embedded-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>components-starter</artifactId>
<version>3.8.0-SNAPSHOT</version>
</parent>
<artifactId>camel-infinispan-embedded-starter</artifactId>
<packaging>jar</packaging>
<!-- <name>Camel Spring Boot :: Starters :: Dozer</name>-->
<!-- <description>Spring-Boot Starter for Camel Support for the Dozer type conversion framework</description>-->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-infinispan-embedded</artifactId>
<version>${camel-version}</version>
</dependency>
<!--START OF GENERATED CODE-->
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-core-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
</dependency>
<!--END OF GENERATED CODE-->
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// spring-boot-auto-configure options: START
:page-partial:
:doctitle: Camel Spring Boot Starter for infinispan-embedded

== Spring Boot Auto-Configuration

When using infinispan-embedded with Spring Boot make sure to use the following Maven dependency to have support for auto configuration:

[source,xml]
----
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-infinispan-embedded-starter</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
----


The component supports 21 options, which are listed below.



[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *camel.component.infinispan-embedded.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.infinispan-embedded.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. 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.infinispan-embedded.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.manager.EmbeddedCacheManager type. | | EmbeddedCacheManager
| *camel.component.infinispan-embedded.cache-container-configuration* | The CacheContainer configuration. Used if the cacheContainer is not defined. The option is a org.infinispan.configuration.cache.Configuration type. | | Configuration
| *camel.component.infinispan-embedded.clustered-listener* | If true, the listener will be installed for the entire cluster | false | Boolean
| *camel.component.infinispan-embedded.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration type. | | InfinispanEmbeddedConfiguration
| *camel.component.infinispan-embedded.configuration-uri* | An implementation specific URI for the CacheManager | | String
| *camel.component.infinispan-embedded.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener type. | | InfinispanEmbeddedCustomListener
| *camel.component.infinispan-embedded.default-value* | Set a specific default value for some producer operations. The option is a java.lang.Object type. | | Object
| *camel.component.infinispan-embedded.enabled* | Whether to enable auto configuration of the infinispan-embedded component. This is enabled by default. | | Boolean
| *camel.component.infinispan-embedded.event-types* | 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 | | String
| *camel.component.infinispan-embedded.flags* | A comma separated list of org.infinispan.context.Flag to be applied by default on each cache invocation | | String
| *camel.component.infinispan-embedded.key* | Set a specific key for producer operations. The option is a java.lang.Object type. | | Object
| *camel.component.infinispan-embedded.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
| *camel.component.infinispan-embedded.old-value* | Set a specific old value for some producer operations. The option is a java.lang.Object type. | | Object
| *camel.component.infinispan-embedded.operation* | The operation to perform | | InfinispanOperation
| *camel.component.infinispan-embedded.query-builder* | Specifies the query builder. The option is a org.apache.camel.component.infinispan.InfinispanQueryBuilder type. | | InfinispanQueryBuilder
| *camel.component.infinispan-embedded.remapping-function* | Set a specific remappingFunction to use in a compute operation. The option is a java.util.function.BiFunction type. | | BiFunction
| *camel.component.infinispan-embedded.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader | | String
| *camel.component.infinispan-embedded.sync* | If true, the consumer will receive notifications synchronously | true | Boolean
| *camel.component.infinispan-embedded.value* | Set a specific value for producer operations. The option is a java.lang.Object type. | | Object
|===


// spring-boot-auto-configure options: END
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.infinispan.embedded.springboot;

import javax.annotation.Generated;
import org.apache.camel.CamelContext;
import org.apache.camel.Component;
import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedComponent;
import org.apache.camel.spi.ComponentCustomizer;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
import org.apache.camel.spring.boot.ComponentConfigurationProperties;
import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.convert.ApplicationConversionService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo")
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter(CamelAutoConfiguration.class)
@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
@EnableConfigurationProperties({ComponentConfigurationProperties.class,InfinispanEmbeddedComponentConfiguration.class})
@ConditionalOnHierarchicalProperties({"camel.component", "camel.component.infinispan-embedded"})
public class InfinispanEmbeddedComponentAutoConfiguration {

@Autowired
private ApplicationContext applicationContext;
private final CamelContext camelContext;
@Autowired
private InfinispanEmbeddedComponentConfiguration configuration;

public InfinispanEmbeddedComponentAutoConfiguration(
org.apache.camel.CamelContext camelContext) {
this.camelContext = camelContext;
ApplicationConversionService acs = (ApplicationConversionService) ApplicationConversionService.getSharedInstance();
acs.addConverter(new InfinispanEmbeddedComponentConverter(camelContext));
}

@Lazy
@Bean
public ComponentCustomizer configureInfinispanEmbeddedComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.infinispan-embedded.customizer")
&& target instanceof InfinispanEmbeddedComponent;
}
};
}
}
Loading