LibraryToggle FramesPrintFeedback

Available as of Camel 2.0

The quickfix component adapts the QuickFIX/J FIX engine for using in Camel . This component uses the standard Financial Interchange (FIX) protocol for message transport.

[Important]Previous Versions

The quickfix component was rewritten for Camel 2.5. For information about using the quickfix component prior to 2.5 see the documentation section below.

Maven users will need to add the following dependency to their pom.xml for this component:

    <!-- use the same version as your Camel core version -->

The exchange headers include information to help with exchange filtering, routing and other processing. The following headers are available:

Header Name Description
EventCategory One of AppMessageReceived, AppMessageSent, AdminMessageReceived, AdminMessageSent, SessionCreated, SessionLogon, SessionLogoff. See the QuickfixjEventCategory enum.
SessionID The FIX message SessionID
MessageType The FIX MsgType tag value
DataDictionary Specifies a data dictionary to used for parsing an incoming message. Can be an instance of a data dictionary or a resource path for a QuickFIX/J data dictionary file

The DataDictionary header is useful if string messages are being received and need to be parsed in a route. QuickFIX/J requires a data dictionary to parse certain types of messages (with repeating groups, for example). By injecting a DataDictionary header in the route after receiving a message string, the FIX engine can properly parse the data.

When the component detects an initiator or acceptor session setting in the QuickFIX/J configuration file it will automatically create the corresponding initiator and/or acceptor connector. These settings can be in the default or in a specific session section of the configuration file.

Session Setting Component Action
ConnectionType=initiator Create an initiator connector
ConnectionType=acceptor Create an acceptor connector

The threading model for the QuickFIX/J session connectors can also be specified. These settings affect all sessions in the configuration file and must be placed in the settings default section.

Default/Global Setting Component Action
ThreadModel=ThreadPerConnector Use SocketInitiator or SocketAcceptor (default)
ThreadModel=ThreadPerSession Use ThreadedSocketInitiator or ThreadedSocketAcceptor

The QuickFIX/J logger implementation can be specified by including the following settings in the default section of the configuration file. The ScreenLog is the default if none of the following settings are present in the configuration. It's an error to include settings that imply more than one log implementation.

Default/Global Setting Component Action
ScreenLogShowEvents Use a ScreenLog
ScreenLogShowIncoming Use a ScreenLog
ScreenLogShowOutgoing Use a ScreenLog
SLF4J* Camel 2.6+. Use a SLF4JLog. Any of the SLF4J settings will cause this log to be used.
FileLogPath Use a FileLog
JdbcDriver Use a JdbcLog
Default/Global Setting Component Action
UseJmx if Y, then enable QuickFIX/J JMX

Camel 2.6+

The QuickFIX/J component includes a Spring FactoryBean for configuring the session settings within a Spring context. A type converter for QuickFIX/J session ID strings is also included. The following example shows a simple configuration of an acceptor and initiator session with default settings for both sessions.

<!-- camel route -->
      <camelContext id="quickfixjContext" xmlns="">
      <from uri="quickfix:example"/>
      <simple>${in.header.EventCategory} == 'AppMessageReceived'</simple>
      <to uri="log:test"/>
      <!-- quickfix component -->
      <bean id="quickfix" class="org.apache.camel.component.quickfixj.QuickfixjComponent">
      <property name="engineSettings">
      <entry key="quickfix:example" value-ref="quickfixjSettings"/>
      <property name="messageFactory">
      <bean class="org.apache.camel.component.quickfixj.QuickfixjSpringTest.CustomMessageFactory"/>
      <!-- quickfix settings -->
      <bean id="quickfixjSettings"
      <property name="defaultSettings">
      <entry key="SocketConnectProtocol" value="VM_PIPE"/>
      <entry key="SocketAcceptProtocol" value="VM_PIPE"/>
      <entry key="UseDataDictionary" value="N"/>
      <property name="sessionSettings">
      <entry key="FIX.4.2:INITIATOR->ACCEPTOR">
      <entry key="ConnectionType" value="initiator"/>
      <entry key="SocketConnectHost" value="localhost"/>
      <entry key="SocketConnectPort" value="5000"/>
      <entry key="FIX.4.2:ACCEPTOR->INITIATOR">
      <entry key="ConnectionType" value="acceptor"/>
      <entry key="SocketAcceptPort" value="5000"/>

Available since Camel 2.0

The quickfix component is an implementation of the QuickFIX/J engine for Java . This engine allows to connect to a FIX server which is used to exchange financial messages according to FIX protocol standard.

Note: The component can be used to send/receives messages to a FIX server.

Comments powered by Disqus