camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Quickfix
Date Wed, 25 Nov 2009 13:52:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Quickfix</a></h2>
     <h4>Page <b>edited</b> by             <a href="">Charles
     <div class="notificationGreySide">
         <h2><a name="Quickfix-QuickfixComponent"></a>Quickfix Component</h2>

<p>The <b>quickfix</b> component is an implementation of the <a href=""
rel="nofollow">QuickFix</a> engine for Java . This engine allows to connect to a
FIX server which is used to exchange financial messages according to <a href=""
rel="nofollow">FIX protocol</a> standard.  </p>

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

<h3><a name="Quickfix-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
quickfix-server:config file
quickfix-client:config file

<p>Where <b>config file</b> is the location (in your classpath) the quickfix
configuration file used to configure the engine at the startup.</p>

<p><b>Note:</b> Information about parameters available for quickfix can
be found on <a href=""
rel="nofollow">QuickFixJ</a> web site.</p>

<p>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.</p>

<p><b>Warning:</b> 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.</p>

<h3><a name="Quickfix-Exchangedataformat"></a>Exchange data format</h3>

<p>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. </p>

<p>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. </p>

<p><b>Note:</b> Alternatively, you can use <a href="/confluence/display/CAMEL/Bindy"
title="Bindy">camel bindy dataformat</a> to transform the FIX message into your own
java POJO</p>

<p>When a message must be send to QuickFix, then you must create a QuickFix.Message

<h3><a name="Quickfix-Samples"></a>Samples</h3>

<p>Direction : to FIX gateway</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;from uri=<span class="code-quote">"activemq:queue:fix"</span>/&gt;
&lt;bean ref=<span class="code-quote">"fixService"</span> method=<span
class="code-quote">"createFixMessage"</span> /&gt; <span class="code-comment">//
bean method in charge to transform message into a QuickFix.Message
</span>&lt;to uri=<span class="code-quote">"quickfix-client:META-INF/quickfix/client.cfg"</span>
/&gt; <span class="code-comment">// Quickfix engine who will send the FIX messages
to the gateway</span>

<p>Direction : from FIX gateway</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;from uri=<span class="code-quote">"quickfix-server:META-INF/quickfix/server.cfg"</span>/&gt;
<span class="code-comment">// QuickFix engine who will receive the message from FIX
</span>&lt;bean ref=<span class="code-quote">"fixService"</span> method=<span
class="code-quote">"parseFixMessage"</span> /&gt; <span class="code-comment">//
bean method parsing the QuickFix.Message
</span>&lt;to uri=<span class="code-quote">"uri="</span>activemq:queue:fix<span
class="code-quote">"/&gt;"</span> /&gt;

<h3><a name="Quickfix-SeeAlso"></a>See Also</h3>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting

     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View Online</a>
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message