The file input adapter reads the tail of a given file and feeds that to the product engine. It only supports text input mapping type.
Configuring input file event adapter
You can configure input file event adapter using the management console or using a configuration file.
Configure using the management console
Follow the instructions below to configure input file event adapter using the management console. This deploys the event adapter in the <PRODUCT_HOME>
/
repository/
deployment/
server/
inputeventadaptors/
directory.
- Log in to the product's management console, and click Configure.
- Click Input Event Adaptors in the Event Processor Configs menu, and then click Add Input Event Adaptor.
- Enter details as shown in the below example.
Click Add Event Adaptor.
Configure using a configuration file
Follow the instructions below to configure input file event adapter using a configuration file.
Create an XML file with the following input file event adapter configurations. Input event adapter implementation must start with
<inputEventAdaptor>
as the root element.<inputEventAdaptor name="fileInputAdaptor" statistics="disable" trace="disable" type="file" xmlns="http://wso2.org/carbon/eventadaptormanager"/>
Add the XML file to the
<PRODUCT_HOME>/repository/deployment/server/inputeventadaptors/
directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy to/from the server.
Configuring input file event adapter message properties
The configured input event adapters are used in event builders. With input event adapter message properties, event builders are able to extract data from the incoming events to build the event streams. Message properties specific to input event adapters of the file
type can be configured as follows.
- Log into the CEP Management Console. For detailed instructions, see Running the Product.
- Click the Configure tab and then click Event Builders to open the Event Builder Details page.
Click the name of the event builder to which the relevant input event adapter is connected.
The message properties of a
file
input event adapter are described below. Change the property values as required.Property Description File path Path of the file to be used as the source to generate events Input Mapping Type The incoming event type to be mapped. The input file event adapter only supports text input mapping type.