java - Apache Camel - Execute a task immediately before polling consumer -



java - Apache Camel - Execute a task immediately before polling consumer -

i'm trying create route polls folder files match given regex. route intended batch pickup files folder. since, move of files folder isn't atomic need phone call db sproc before route polls command flow reasons. in jdsl route builder, instead of this:

configure(){ from("fileuri").processor(_dbupdater).to(endpoint); }

i need this:

configure(){ processor(_dbupdater).from("fileuri").to(endpoint) }

i know doesn't work i'm trying possible? can execute task before polling consumer?

yes can adding direct endpoint from endpoint @ start of flow. route :-

from("direct:a").processor(_dbupdater).to("fileuri").to(endpoint)

you can read more camel direct endpoint @ http://camel.apache.org/direct.html official camel site.

java apache-camel

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -