[
https://issues.apache.org/jira/browse/CAMEL-9733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15206185#comment-15206185
]
Jose Luis Pedrosa commented on CAMEL-9733:
------------------------------------------
Hi Claus,Thomas
first of all, thanks for your fast answers. I was not aware of the toD
component, that could help me indeed in this case.
Let me explain my point of view on the subject: I think this is in the scenario
where both options are good, toD and header field based:
I tend to think that there will be limited amount of different jobs in a given
ctx ( I'd say < 10), then toD would noo create hell out of endpoints, and not a
mess or a significant performance impact. (as just starting a job implies many
queries, inserts, so choosign a camel endpoint is neglectible from volume of
worj). On the other hand picking up a new Job, it's piece of cake:
{code:java}
if (jobLauncher == null) {
jobLauncher = resolveJobLauncher();
}
if (job == null && jobName != null) {
job = CamelContextHelper.mandatoryLookup(getCamelContext(),
jobName, Job.class);
}
{code}
So as the effort of having it header based is that low, it could make sense be
able to run it dynamically, which be really good in scenarios with many jobs.
Do you guys share my view?
> enable dynamic job name in component spring-batch
> -------------------------------------------------
>
> Key: CAMEL-9733
> URL: https://issues.apache.org/jira/browse/CAMEL-9733
> Project: Camel
> Issue Type: Wish
> Components: camel-spring-batch
> Affects Versions: 2.16.2, 2.17.0
> Environment: any
> Reporter: Jose Luis Pedrosa
> Priority: Minor
> Fix For: 2.17.1
>
> Original Estimate: 16m
> Remaining Estimate: 16m
>
> Hi
> Currently springBatch accepts a parameter jobName in the url, which is
> evaluated during the creation of the endpoint.
> This makes impossible to launch different jobs dinamically.The requested
> feature would be to make it message context based, in the headers with a
> parameter
> "jobNameHeader", which would be evaluated per message. In a similar way as
> SQL and the columns value parameters.
> If the project is interested and willing to incorporate it into the sources,
> I could offer me to code it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)