FAST is a binary encoding method for message oriented data streams. FAST is an acronym for FIX Adapted for STreaming. The original purpose of FAST was optimization of FIX messages.
In order to decode FAST data to FIX message the following 4 steps are required:
The FIX engine must be initialized as described in the following section. The appropriate FIX dialect must be configured during this step if necessary as described here.
To load FAST templates from an XML source the following code sequence can be used.
40 | final InputStream templateStream = ResourceLoaderUtil.CLASSPATH_LOADER.getResource( "site/templates.xml" ); |
The library supports both FAST standards: FAST 1.1 and FAST 1.2. It automatically recognizes the FAST standard version of a given FAST template - no special actions are required.
Create Decoder instance first.
43 | final Decoder decoder = new Decoder(templateStream, FastVersion.FAST_1_1, Version.FIX50); |
Decode FAST stream chunks then.
48 | final Message fixMessage = decoder.decode(data); |
The FIX engine must be shutdown as described in the following section.
Check also Samples :: Simple FAST.