Configuration

The default name for the FIX Adapter configuration file is fix_adapter_prefs.xml, located in the same directory as the c8_fix_adapter executable.

When starting the FIX adapter, always use the --config option to explicitly specify the configuration file name and location (for example, [c:\sybasec8\enterprise-adapters\fix\bin]c8_fix_adapter.exe --config=my_fix_adapter_prefs.xml).

The FIX Adapter configuration file contains three main sections:

FIX Adapter-Specific Settings

Settings controlling retry behavior when initializing publishers/subscribers on adapter startup:
<!-- Retry settings to use when initializing publishers/subscribers -->
	<!-- ConnectionRetryInterval set to 0 or missing means disable retries -->
	<!-- When ConnectionRetryInterval is set to a non-zero value, the adapter -->
	<!-- will retry the number of times specified by the ConnectionTotalRetries -->
	<!-- setting, or keep retrying until connection succeeds or the adapter is -->
	<!-- shutdown if ConnectionTotalRetries is set to 0 or is missing -->
	<preference name="ConnectionRetryInterval">1</preference>
	<preference name="ConnectionTotalRetries">3</preference>

<ConnectionTotalRetries>

Indicates the number of times to retry the initialization of publishers and subscribers. If set to 0 or missing, the adapter retries until the publishers or subscribers initialize, or the adapter is shut down.

<ConnectionRetryInterval>

When this is set to a non-zero value, the adapter retries the number of times specified by the <ConnectionTotalRetries> setting (or continuously if <ConnectionTotalRetries> is 0 or missing) using the specified value as the retry interval, in seconds. If set to 0, retrying is disabled.

Settings related to the Connection Plug-in:
<section name="ConnectionPlugin">
	    <preference name="LibraryName">c8_fix_adapter_plugin_example_lib</preference>
	    <preference name="InitializeFunction">C8FIXConnPluginInitialize</preference>
	    <preference name="SendMessageFunction">C8FIXConnPluginSendMessage</preference>
	    <preference name="ShutdownFunction">C8FIXConnPluginShutdown</preference>
	    <!-- Add implementation-specific settings to the following section -->
	    <section name="CustomSettings"/>
	</section>

<LibraryName>

The name of the run-time library (.dll/.so) where the Connection Plug-in functions are defined.

<InitializeFunction>

The name of the Connection Plug-in initialize function.

<SendMessageFunction>

The name of the Connection Plug-in send message function.

<ShutdownFunction>

The name of the Connection Plug-in shutdown function.

<CustomSettings>

Settings specific to the Connection Plug-in implementation.

Settings related to the Data Mapping Plug-in:
<section name="DataMappingPlugin">
	    <preference name="LibraryName">c8_fix_adapter_plugin_example_lib</preference>
	    <preference name="InitializeFunction">C8FIXDMInitialize</preference>
	    <preference name="ConvertFIXToTupleFunction">C8FIXDMConvertToTuple</preference>
	    <preference name="ConvertTupleToFIXFunction">C8FIXDMConvertToFIX</preference>
	    <preference name="ConvertFIXRawToTupleFunction">C8FIXDMConvertToTuple</preference>
	    <preference name="ConvertTupleToFIXRawFunction">C8FIXDMConvertToFIX</preference>
	    <preference name="DestroyFIXMessageFunction">C8FIXDMDestroyFIXMessage</preference>
	    <preference name="ShutdownFunction">C8FIXDMShutdown</preference>
	    <!-- Add implementation-specific settings to the following section -->
	    <section name="CustomSettings"/>
	</section>

<LibraryName>

The name of the run-time library (.dll/.so) where the Data Mapping Plug-in functions are defined.

<InitializeFunction>

The name of the Data Mapping Plug-in initialize function.

<ConvertFIXtoTupleFunction>

The name of the Data Mapping Plug-in FIX-to-tuple conversion function.

<ConvertTupleToFIXFunction>

The name of the Data Mapping Plug-in tuple-to-FIX conversion function.

<ConvertFIXRawToTupleFunction

The name of the Data Mapping Plug-in FIX raw-to-tuple conversion function.

<ConvertTupleToFIXRawFunction>

The name of the Data Mapping Plug-in tuple-to-FIX raw conversion function.

<DestroyFIXMessageFunction>

The function called to properly deallocate a FIX message.

<ShutdownFunction>

The name of the Data Mapping Plug-in shutdown function.

<CustomSettings>

Settings specific to the Data Mapping Plug-in implementation.

Settings related to publishers:
 <section name="Publishers">
	     <preference name="PublisherCount">2</preference>
	     <!-- Publisher sections. These must be named Publisher1 -->
	     <!-- through PublisherN, where N corresponds to the -->
	     <!-- PublisherCount value specified. -->
	     <section name="Publisher1">
	            <preference name="C8StreamUri">ccl://localhost:6789/Stream/Default/TestFIX/instream1</preference>
	     </section>
	     <section name="Publisher2">
	            <preference name="C8StreamUri">ccl://localhost:6789/Stream/Default/TestFIX/instream2</preference>
	            <preference name="SessionFilter">FIX4.3::sender1::target1</preference>
	            <preference name="MessageFilter">A,8,9</preference>
	     </section>
	 </section>

<PublisherCount>

Specifies the number of publishers.

<Publisher1> ... <PublisherN>

Settings pertaining to each publisher, where N is the value specified in <PublisherCount>

<C8StreamUri>

The URI of the stream that the publisher publishes to.

<SessionFilter>

A comma-separated list of FIX session IDs to include when publishing.

If this property is empty or unspecified, then all FIX messages belonging to all session IDs will be included.

<MessageFilter>

A comma-separated list of FIX message types to include when publishing to the stream.

If this property is empty or unspecified, then FIX messages of all types will be included.

Settings related to subscribers:
 <section name="Subscribers">
	    <preference name="SubscriberCount">2</preference>
	    <!-- Subscriber sections. These must be named Subscriber1 -->
	    <!-- through SubscriberN, where N corresponds to the -->
	    <!-- SubscriberCount value specified. -->
	    <section name="Subscriber1">
	            <preference name="C8StreamUri">ccl://localhost:6789/Stream/Default/TestFIX/outstream1</preference>
	            <preference name="SessionFilter">FIX4.2::sender1::target1</preference>
	            <preference name="MessageFilter">7</preference>
	     </section>
	     <section name="Subscriber2">
	            <preference name="C8StreamUri">ccl://localhost:6789/Stream/Default/TestFIX/outstream2</preference>
	     </section>
	 </section>

<SubscriberCount>

Specifies the number of subscribers.

<Subscriber1> ... <SubscriberN>

Settings pertaining to each subscriber, where N is the value specified in <SubscriberCount>

<C8StreamUri>

The URI of the stream that the subscriber subscribes from.

<SessionFilter>

A comma-separated list of FIX session IDs to include when subscribing from the stream.

If this property is empty or unspecified, then all FIX messages belonging to all session IDs will be included.

<MessageFilter>

A comma-separated list of FIX message types to include when subscribing from the stream.

If this property is empty or unspecified, then FIX messages of all types will be included.

Settings for the logging-related section:
<section name="FileLogger">
	    <preference name="Type">File</preference>
	    <preference name="Layout">Text</preference>
	    <preference name="LogLevel">Info</preference>
	    <preference name="DetailsLevel">Normal</preference>
	    <preference name="Filename">c:\logs\fix_adapter.log</preference>
	    <preference name="MaxSize">100MB</preference>
	    <preference name="ReadPerms">owner</preference>
	    <preference name="Rotate">10</preference>
	</section>
Note: The logging-related section is configured in the same fashion as CEP Server.
Other settings:
<preference name="LicenseFolder">C:\SybaseC8\enterprise-adapters\fix\SySAM-2_0\licenses</preference>

<LicenseFolder>

Used to specify the location of the SySAM license folder.

Message Filtering

Messages can be filtered by session ID and/or FIX message type using the SessionFilter and MessageFilter tags in the config file:
<section name=''Publishers''>
		 		 <preference name=''PublisherCount''>2</preference>
		 		 <!-- Publisher sections. These must be named Publisher1 -->
		 		 <!-- through PublisherN, where N corresponds to the -->
		 		 <!-- PublisherCount value specified. -->
		 		 <section name=''Publisher1''>
		 		 		 <preference name=''C8StreamUri''>ccl://localhost:6789/Stream/Default/TestFIX/instream1</preference>
		 		 		 <preference name=''SessionFilter''>FIX4.3::sender1::target1</preference>
		 		 		 <preference name=''MessageFilter''>A,8,9</preference>
		 		 </section>
Note: The filters are an OR relationship. SessionFilter allows the filtering of FIX messages by FIX session ID, whereas MessageFilter allows the filtering of FIX messages by their FIX message type.

In the above example, either messages from session "FIX4.3::sender1::target1'', or messages of message types A, 8, or 9, will be published to the stream with URI ''ccl://localhost:6789/Stream/Default/TestFIX/instream1'' (but not both).

If the SessionFilter is not specified, the behavior defaults to ''all session IDs''. Similarly, if no MessageFilter is specified, the behaviour defaults to ''all message types''.

Filters can be specified such that the same FIX message is published to multiple streams, and the SessionFilter and MessageFilter tags can also be used for Subscribers when reading messages from the CEP streams.