Camel Ignite component
Available as of Camel 2.17
Apache Ignite In-Memory Data Fabric is a high-performance, integrated and distributed in-memory platform for computing and transacting on large-scale data sets in real-time, orders of magnitude faster than possible with traditional disk-based or flash technologies. It is designed to deliver uncompromised performance for a wide set of in-memory computing use cases from high performance computing, to the industry most advanced data grid, highly available service grid, and streaming. See all features.
This component offers seven endpoints to cover much of Ignite's functionality:
- Ignite Cache.
- Ignite Compute.
- Ignite Messaging.
- Ignite Events.
- Ignite Sets.
- Ignite Queues.
- Ignite ID Generator.
To use this component, add the following dependency to your pom.xml
:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-ignite</artifactId> <version>${camel.version}</version> <!-- use the same version as your Camel core version --> </dependency>
URI formats
ignite:cache:cacheName?options ignite:compute:endpointId?options ignite:messaging:topicName?options ignite:events:endpointId?options ignite:sets:setName?options ignite:queue:queueName?options ignite:idgen:sequenceName?options
Initializing the Ignite component
Each instance of the Ignite component is associated with an underlying org.apache.ignite.Ignite
instance. You can interact with two Ignite clusters by initializing two instances of the Ignite component and binding them to different IgniteConfiguration
s. There are 3 ways to initialize the Ignite component:
- By passing in an existing
org.apache.ignite.Ignite
instance. Here's an example using Spring config:
<bean name="ignite" class="org.apache.camel.component.ignite.IgniteComponent"> <property name="ignite" ref="ignite" /> </bean>
- By passing in an
IgniteConfiguration
, either constructed programmatically or through inversion of control (e.g. Spring, Blueprint, etc.). Here's an example using Spring config:
<bean name="ignite" class="org.apache.camel.component.ignite.IgniteComponent"> <property name="igniteConfiguration"> <bean class="org.apache.ignite.configuration.IgniteConfiguration"> [...] </bean> </property> </bean>
- By passing in a
URL
,InputStream
orString
URL to a Spring-based configuration file. In all three cases, you inject them in the same property calledconfigurationResource
. Here's an example using Spring config:
<bean name="ignite" class="org.apache.camel.component.ignite.IgniteComponent"> <property name="configurationResource" value="file:[...]/ignite-config.xml" /> </bean>
Additionally, if using Camel programmatically, there are several convenience static methods in IgniteComponent
that return a component out of any of these configuration options:
IgniteComponent#fromIgnite(Ignite)
IgniteComponent#fromConfiguration(IgniteConfiguration)
IgniteComponent#fromInputStream(InputStream)
IgniteComponent#fromUrl(URL)
IgniteComponent#fromLocation(String)
General options
All endpoints share the following options:
Option | Type | Default value | Description |
---|---|---|---|
propagateIncomingBodyIfNoReturnValue | boolean | true | |
treatCollectionsAsCacheObjects | boolean | false |