Inbound event processing

This topic describes the inbound event processing for WebSphere® Adapter for Flat Files.

Inbound event processing

The inbound event processing is an asynchronous operation. The backend enterprise information system (EIS) generates events in the form of files. These files are stored in a user configured event directory. In the inbound processing mode, the adapter polls event files from a user configured event directory at regular intervals. When an event file arrives in the event directory, the adapter reads the entire event file as bytes, wraps the bytes inside a business object, and posts the business object to a subscribed endpoint. After the event file is posted, the adapter either archives the polled event file in an archive directory or deletes it based on the user configuration. The event directory, archive directory, the poll interval, and the poll quantity (the number of event files to poll in a single poll cycle) are all configurable parameters.

File Splitting

The inbound event processing mode also supports a file splitting feature, where the event file is split into several chunks and each chunk is posted to the endpoint separately. This reduces the memory loading during event processing. The client specifies the file split threshold and file chunk size in the adapter configuration. The properties FileSplitThreshold and FileChunkSize are configured in the ActivationSpecification. Any event file which exceeds the file split threshold is split into chunks whose size is as specified in the file chunk size. The event file splitting does not change the notion of poll quantity. The adapter still sends a maximum of poll quantity event files to the endpoint. However, now the event files which exceed the threshold size are sent to the endpoint as separate chunks. If FileSplitThreshold has a negative value, the chunking feature is disabled and the FileChunkSize value is not considered. In this mode, the adapter can be configured either from WebSphere Process Server administrative console or using WebSphere Integration Developer.

When chunking is enabled, each chunk results in a business object. This means that the PollQuantity and the number of business objects obtained by the endpoint can be different.

For merging of files, the adapter does not take the ownership of reassembling the chunked data. Rather, it gives the information about the chunk so that an external application can merge the chunks. The chunk information is included in the outputString property of the business object. The chunk information includes the chunk size in bytes and the event ID.

Event management architecture and control flow

The event management framework (EMF) maintains information about the endpoint, which receives business objects from the adapter. The EMF internally uses the event data table (EDT) to track the events. The ActivationSpecification properties EDTDatabaseName, EDTDriverName, EDTTableName, EDTUserName and EDTUserPassword determine the configuration values for the event data table used by the event management framework. At the specified poll period, the adapter polls the files in the event directory, which are in accord with the user-configured file mask and poll quantity specification. The adapter internally uses an event table, addressed as Flat Files Event Table, to log the status of the events that have been polled but not yet posted to the endpoint. The ActivationSpecification property, FFEventTableName, determines the name of the Flat Files event table. FFEventTable is only created in the Cloudscape™ database and not in any database that is used for the EDT table. Once an event is polled, the adapter generates the Event ID and stores the event reference in the Flat Files event table with a 'NEW' status. The adapter then waits for the base class method callback to proceed further. The base class functions call back the adapter methods to process the events. The adapter changes the status for the event in the Flat Files event table to a 'IN_PROGRESS' status. It wraps the file content in a business object and posts the same across to the configured endpoint. The event entry is then deleted from the Flat Files event table. The event is archived optionally, based on the configuration.

Related concepts
Outbound request processing

Terms of use |

Last updated: Sun Mar 12 11:47:10 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)