Skip to content

Latest commit

 

History

History

configoperator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Configuration operator

Reads and parse the configuration file and trigger processing jobs for each feed.

  1. AllFeedsConfigReader - Reads the configuration and creates for each feed the FeedConfig object
  2. AllFeedsWriter - triggers a new job for each FeedConfig. The job name is configurable by PROCESS_JOB_NAME property and job timeout by PROCESS_JOB_TIMEOUT_SEC where -1 is no timeout.

Job Configuration

  1. configUrl - URL of configuration. e.g. file:///app/config/feeds-config.yaml

To customize the name of job that is triggered define it in the writer property

    <writer ref="allFeedsWriter">
        <properties>
            <!-- Optional property defining the name of job to trigger. Default is process-feed.xml -->
            <property name="PROCESS_JOB_NAME" value="process-feed.xml"/>
            <!-- Optional property defining the timeout of triggered job. Default is 60 seconds. -1 is infinite -->
            <property name="PROCESS_JOB_TIMEOUT_SEC" value="60"/>
        </properties>
    </writer>

Configuration file schema

- group1:
 - code: feedcode1
   title: Feed title (Optional)
   author: Name of Author used if the original Feed author not present (Optional)
   url: http://example.com/atom.xml
 - code: feedcode2
   url: http://example.com/atom2.xml
- group2:
 - code: feedcode3
   url: http://example.com/atom3.xml
 - code: feedcode4
   url: http://example.com/atom4.xml

Example Usage

See feeds2mongo example See Config example