camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BARRAULT <herve.barra...@gmail.com>
Subject Dynamic route and polling consumer
Date Wed, 23 May 2012 16:05:59 GMT
Hi,
I am coping with a case which is the following :

I have a cache.
In this cache, i can have multiple entries.
The keys of these keys are not known a priori.

When a new entries arrives i should poll this entry periodically a do a job
(even if the value has not changed).
When an entry is removed i should stop polling this entry (each polling can
have different period).

I thought using only one route to manage this case but it does not seem
possible.

I think using dynamic route (which are created/stopped programmatically)
with a camel-quartz component (i need clustering mechanism).

As i would use the JobDataMap to pass some parameters to the job, is there
an API to manage this ?
It seems (looking to the documentation) that is only usable when using a
stateful job (I think using setHeader before calling the processor as a
temporary solution but it seems a bit strange).

Is the camel-quartz component really adapted for my case (it is not a
standard predefined scheduling mechanism) ?

Is there a "ready to use" camel solution for this kind of behavior ?

Thanks for answers
Regards
Hervé



PS :
For Information the links to :
StatefulJob<http://www.quartz-scheduler.org/docs/api/2.0.0/org/quartz/StatefulJob.html>,
and JobDataMap<http://www.quartz-scheduler.org/docs/api/2.0.0/org/quartz/JobDataMap.html>(in
http://camel.apache.org/quartz.html) are dead.
I guess the right ones are :
http://quartz-scheduler.org/api/2.0.0/org/quartz/StatefulJob.html and
http://quartz-scheduler.org/api/2.0.0/org/quartz/JobDataMap.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message