Input File Event Adapter
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 BAM Management Console. For detailed instructions, see Running the Product.
- In the Main tab, click Event Streams to open the Available Event Streams page.
- Click the Inflows link of the event stream to which the relevant input event adapter is connected. As a result, Event In-Flows (<Input_Event_Adapter_Name>) opens.
Click on the relevant event builder name to open the Event Builder Details page.
The message properties of afile
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.