WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
Skip to end of metadata
Go to start of metadata

File-tail event receiver reads the tail of a given file and feeds that to the product engine. It only supports text input mapping type.

Creating a file-tail event receiver

For instructions on creating a file-tail event receiver, see Configuring Event Receivers.

Configuring global properties

The following global property can be set for the file-tail event receiver type in the <CEP_HOME>/repository/conf/input-event-adapters.xml file. This property applies to all the receivers of the file-tail type. If this property is removed from the file, its default value still applies.

Property KeyDescriptionData TypeDefault Value this property is set to true, events received by file-tail receivers are re-created in every node in the cluster.Booleanfalse

Configuring adapter properties

Specify the Adapter Properties, when creating  a file-tail event receiver using the management console as shown below.

create a file-tail input event adapter

After entering the above adapter properties, select the  Event Stream  to which you want to map the incoming events, and the  Message Format   which you want to apply on the receiving events . Also, click  Advanced  to define custom input mappings based on the  Message Format  you selected. For more information on custom input mapping types, see Input Mapping Types .

You can also d efine the respective adapter properties of the event receiver based on the transport type within the  <from>  element of the event receiver configuration in the <PRODUCT_HOME>/repository/deployment/server/eventreceivers/ directory as follows.

<eventReceiver name="FileTailInputEventAdapter" statistics="disable" trace="disable" xmlns="">
    <from eventAdapterType="file-tail">
        <property name="filepath">/User/Desktop/abc.txt</property>
        <property name="startFromEnd">true</property>
        <property name="delayInMillis">10</property>

The above adapter properties are described below.

Adapter property
Configuration file propertyExample

File path

Absolute path of the text file to read the data from.



The delay between checks for new content on file in milliseconds.


Start From End

Set to true to tail from the end of the file, false to tail from the beginning of the file.


Related samples

For more information on file-tail event receiver type, see the following samples.

  • No labels