= Ignite Compute Component
:doctitle: Ignite Compute
:shortname: ignite-compute
:artifactid: camel-ignite
:description: Run compute operations on an Ignite cluster.
:since: 2.17
:supportlevel: Stable
:component-header: Only producer is supported
//Manually maintained attributes
:group: Ignite
:camel-spring-boot-name: ignite

*Since Camel {since}*

*{component-header}*

The Ignite Compute endpoint is one of camel-ignite endpoints which allows you to run https://apacheignite.readme.io/docs/compute-grid[compute operations] on the cluster by passing in an IgniteCallable, an IgniteRunnable, an IgniteClosure, or collections of them, along with their parameters if necessary.

The host part of the endpoint URI is a symbolic endpoint ID, it is not used for any purposes.

The endpoint tries to run the object passed in the body of the IN message as the compute job. It expects different payload types depending on the execution type.

// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END

// endpoint options: START

// endpoint options: END


== Expected payload types

Each operation expects the indicated types:
[width="100%",cols="1,4",options="header"]
|=======================================================================
| Operation | Expected payloads
| CALL | Collection of IgniteCallable, or a single IgniteCallable.
| BROADCAST | IgniteCallable, IgniteRunnable, IgniteClosure.
| APPLY | IgniteClosure.
| EXECUTE | ComputeTask, Class<? extends ComputeTask> or an object representing parameters if the taskName option is not null.
| RUN | A Collection of IgniteRunnables, or a single IgniteRunnable.
| AFFINITY_CALL | IgniteCallable.
| AFFINITY_RUN | IgniteRunnable.
|=======================================================================

=== Headers used

This endpoint uses the following headers:
[width="100%",cols="1,1,1,4",options="header"]
|=======================================================================
| Header name | Constant | Expected type | Description
| CamelIgniteComputeExecutionType | IgniteConstants.IGNITE_COMPUTE_EXECUTION_TYPE | IgniteComputeExecutionType enum |
 Allows you to dynamically change the compute operation to perform.

| CamelIgniteComputeParameters | IgniteConstants.IGNITE_COMPUTE_PARAMS | Any object or Collection of objects. |
Parameters for APPLY, BROADCAST and EXECUTE operations.

| CamelIgniteComputeReducer | IgniteConstants.IGNITE_COMPUTE_REDUCER | IgniteReducer |
Reducer for the APPLY and CALL operations.

| CamelIgniteComputeAffinityCacheName | IgniteConstants.IGNITE_COMPUTE_AFFINITY_CACHE_NAME | String |
Affinity cache name for the AFFINITY_CALL and AFFINITY_RUN operations.

| CamelIgniteComputeAffinityKey | IgniteConstants.IGNITE_COMPUTE_AFFINITY_KEY | Object |
Affinity key for the AFFINITY_CALL and AFFINITY_RUN operations.
|=======================================================================


include::spring-boot:partial$starter.adoc[]
