【问题标题】:How to connect and send msg to Fix server from camel如何从骆驼连接并将味精发送到修复服务器
【发布时间】:2016-06-16 11:52:39
【问题描述】:

我需要创建这样的路线: 解析 csv 文件 -> 创建修复字符串 -> 将其发送到外部 FIX 服务器。 所以。如何在 camel xml 配置中建立连接并使用 camel-quickfx 模块发送它? 我有这样的代码:

    <route>
        <from uri="direct:processOneLine2"/>
        <bean ref="orderBean" method="createFixMessage"/>
        <to uri="quickfix-client:META-INF/quickfix/client.cfg"/>
    </route>

及配置:

    [DEFAULT]
ConnectionType=initiator
ReconnectInterval=60
SenderCompID=TW


[SESSION]
BeginString=FIX.4.4
TargetCompID=ARCA
StartTime=12:30:00
EndTime=23:30:00
HeartBtInt=20
SocketConnectPort=3313
SocketConnectHost=localhost
DataDictionary=FIX44.xml

但我得到这样的错误:

原因:org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: 无法在以下位置创建路由 route1:>>> To[quickfix-client:META-INF/quickfix/client.cfg] [Bean[ref:or... 因为无法解析端点:quickfix-client://META-INF/quickfix/client.cfg,因为:没有找到带有方案的组件:quickfix -客户

【问题讨论】:

  • 您的问题是关于如何使用 camel-quickfix 连接到服务器,还是整个路由?
  • 只有如何连接服务器

标签: apache-camel fix-protocol


【解决方案1】:

根据你需要定义的错误信息:

<bean id="quickfix-client" 
      class="org.apache.camel.component.quickfixj.QuickfixjComponent">
  <property name="messageFactory" ref=".."/> <!-- DefaultMessageFactory -->
  <property name="messageStoreFactory" ref=".."/> <!-- MemoryStoreFactory -->
  <property name="logFactory" ref=".."/> <!-- ScreenLogFactory -->
</bean>

属性本身是 QuickFIX/J 类,您需要返回 QuickFIX/J documentation 以了解如何以适合您的方式设置它们。上面的 cmets 是 quickfixj. 包中的默认类,供 unit tests 中的组件使用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-04
    • 2015-03-31
    相关资源
    最近更新 更多