You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Quickfix Component

Available as of Camel 2.0

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

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

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-quickfix</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

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

URI format

quickfix-server:config file
quickfix-client:config file

Where config file is the location (in your classpath) of the quickfix configuration file used to configure the engine at the startup.

Note: Information about parameters available for quickfix can be found on QuickFixJ web site.

The quickfix-server endpoint must be used to receive from FIX server FIX messages and quickfix-client endpoint in the case that you want to send messages to a FIX gateway.

Warning: You cannot use a quickfix engine to send or receive messages in both direction as the FIX protocol handle logon/logout sessions with heartbeat messages which are send to verify if the server or client is still alive in only one direction.

Exchange data format

The QuickFixJ engine is like CXF component a messaging bus using MINA as protocol layer to create the socket connection with the FIX engine gateway.

When QuickFixJ engine receives a message, then it create a QuickFix.Message instance which is next received by the camel endpoint. This object is a 'mapping object' created from a FIX message formatted initially as a collection of key value pairs data. You can use this object or you can use the method 'toString' to retrieve the original FIX message.

Note: Alternatively, you can use camel bindy dataformat to transform the FIX message into your own java POJO

When a message must be send to QuickFix, then you must create a QuickFix.Message instance.

Samples

Direction : to FIX gateway

<route>
<from uri="activemq:queue:fix"/>
<bean ref="fixService" method="createFixMessage" /> // bean method in charge to transform message into a QuickFix.Message
<to uri="quickfix-client:META-INF/quickfix/client.cfg" /> // Quickfix engine who will send the FIX messages to the gateway

Direction : from FIX gateway

<from uri="quickfix-server:META-INF/quickfix/server.cfg"/> // QuickFix engine who will receive the message from FIX gateway
<bean ref="fixService" method="parseFixMessage" /> // bean method parsing the QuickFix.Message
<to uri="uri="activemq:queue:fix"/>" />
  • No labels