<commit_before>[[SpringBatch-SpringBatchComponent]]
Spring Batch Component
~~~~~~~~~~~~~~~~~~~~~~

The *spring-batch:* component and support classes provide integration
bridge between Camel and http://www.springsource.org/spring-batch[Spring
Batch] infrastructure.

Maven users will need to add the following dependency to their `pom.xml`
for this component:

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

[[SpringBatch-URIformat]]
URI format
^^^^^^^^^^

[source,java]
------------------------------
spring-batch:jobName[?options]
------------------------------

Where *jobName* represents the name of the Spring Batch job located in
the Camel registry. Alternatively if a JobRegistry is provided it will be used 
to locate the job instead.

WARNING:This component can only be used to define producer endpoints, which
means that you cannot use the Spring Batch component in a `from()`
statement.

[[SpringBatch-Options]]
Options
^^^^^^^


// component options: START
The Spring Batch component supports 1 options which are listed below.



{% raw %}
[width="100%",cols="2s,1m,8",options="header"]
|=======================================================================
| Name | Java Type | Description
| jobLauncher | JobLauncher | Explicitly specifies a JobLauncher to be used.
| jobRegistry | JobRegistry | Explicitly specifies a JobRegistry to be used.
|=======================================================================
{% endraw %}
// component options: END





// endpoint options: START
The Spring Batch component supports 5 endpoint options which are listed below:

{% raw %}
[width="100%",cols="2s,1,1m,1m,5",options="header"]
|=======================================================================
| Name | Group | Default | Java Type | Description
| jobName | producer |  | String | *Required* The name of the Spring Batch job located in the registry.
| jobFromHeader | producer |  | Boolean | Explicitly defines if the jobName shouls be taken from the headers instead of the URI.
| jobLauncher | producer |  | JobLauncher | Explicitly specifies a JobLauncher to be used.
| jobRegistry | producer |  | JobRegistry | Explicitly specifies a JobRegistry to be used. If set it it will be used to locate jobs.
| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
|=======================================================================
{% endraw %}
// endpoint options: END




[[SpringBatch-Usage]]
Usage
^^^^^

When Spring Batch component receives the message, it triggers the job
execution. The job will be executed using the
`org.springframework.batch.core.launch.JobLaucher` instance resolved
according to the following algorithm:

* if `JobLauncher` is manually set on the component, then use it.
* if `jobLauncherRef` option is set on the component, then search Camel
link:registry.html[Registry] for the `JobLauncher` with the given name.
*Deprecated and will be removed in Camel 3.0!*
* if there is `JobLauncher` registered in the Camel
link:registry.html[Registry] under *jobLauncher* name, then use it.
* if none of the steps above allow to resolve the `JobLauncher` and
there is exactly one `JobLauncher` instance in the Camel
link:registry.html[Registry], then use it.

All headers found in the message are passed to the `JobLauncher` as job<commit_msg>fix spring-batch doc<commit_after>[[SpringBatch-SpringBatchComponent]]
Spring Batch Component
~~~~~~~~~~~~~~~~~~~~~~

The *spring-batch:* component and support classes provide integration
bridge between Camel and http://www.springsource.org/spring-batch[Spring
Batch] infrastructure.

Maven users will need to add the following dependency to their `pom.xml`
for this component:

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

[[SpringBatch-URIformat]]
URI format
^^^^^^^^^^

[source,java]
------------------------------
spring-batch:jobName[?options]
------------------------------

Where *jobName* represents the name of the Spring Batch job located in
the Camel registry. Alternatively if a JobRegistry is provided it will be used 
to locate the job instead.

WARNING:This component can only be used to define producer endpoints, which
means that you cannot use the Spring Batch component in a `from()`
statement.

[[SpringBatch-Options]]
Options
^^^^^^^


// component options: START
The Spring Batch component supports 1 options which are listed below.



{% raw %}
[width="100%",cols="2s,1m,8",options="header"]
|=======================================================================
| Name | Java Type | Description
| jobLauncher | JobLauncher | Explicitly specifies a JobLauncher to be used.
| jobRegistry | JobRegistry | Explicitly specifies a JobRegistry to be used.
|=======================================================================
{% endraw %}
// component options: END





// endpoint options: START
The Spring Batch component supports 5 endpoint options which are listed below:

{% raw %}
[width="100%",cols="2s,1,1m,1m,5",options="header"]
|=======================================================================
| Name | Group | Default | Java Type | Description
| jobName | producer |  | String | *Required* The name of the Spring Batch job located in the registry.
| jobFromHeader | producer | false | boolean | Explicitly defines if the jobName should be taken from the headers instead of the URI.
| jobLauncher | producer |  | JobLauncher | Explicitly specifies a JobLauncher to be used.
| jobRegistry | producer |  | JobRegistry | Explicitly specifies a JobRegistry to be used. If set it it will be used to locate jobs.
| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
|=======================================================================
{% endraw %}
// endpoint options: END




[[SpringBatch-Usage]]
Usage
^^^^^

When Spring Batch component receives the message, it triggers the job
execution. The job will be executed using the
`org.springframework.batch.core.launch.JobLaucher` instance resolved
according to the following algorithm:

* if `JobLauncher` is manually set on the component, then use it.
* if `jobLauncherRef` option is set on the component, then search Camel
link:registry.html[Registry] for the `JobLauncher` with the given name.
*Deprecated and will be removed in Camel 3.0!*
* if there is `JobLauncher` registered in the Camel
link:registry.html[Registry] under *jobLauncher* name, then use it.
* if none of the steps above allow to resolve the `JobLauncher` and
there is exactly one `JobLauncher` instance in the Camel
link:registry.html[Registry], then use it.

All headers found in the message are passed to the `JobLauncher` as job
{'fraction_non_alphanumeric': 0.20495023572551074, 'fraction_numerical': 0.004714510214772132, 'mean_word_length': 4.017739816031537, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7658644', 'n_tokens_mistral': 1951, 'n_tokens_neox': 1816, 'n_words': 798}