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. Following are the specific message properties of input file event adapter.
The message properties of the input file event adapter are described below.
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. |