Positional Project

The Positional project contains two adapter configurations: positionalReader.adfilesmodel and positionalWriter.adfilesmodel. The sample project shows how the adapter transfers records to new files.

In positionalReader.adfilesmodel, Publication Service parses the positional.txt file and creates an object for each order ID, item and customer that it finds in the input file. Publication Service sends each object in a separate message. After processing all lines in the input file, Publication Service exits.

In positionalWriter.adfilesmodel, Subscription Service receives the objects, formats and writes each object to a separate file in the output directory, and uses a timestamp to uniquely identify each file.

To enable Subscription Service to receive and format messages, the qualities of service and wire format are set the same as that for Publication Service. A write schema is defined for the service. After the schema is defined, write file records are automatically created, one for each class found by the write schema. The Item file record is modified so that an asterisk (*) is used as padding for the quantity field. The Orders write file record is modified with an ampersand (&) and an underscore (_) for the ID field and the field1 field respectively. The write schema is associated with Subscription Service in the Schema tab.