...
Install FIXEdge for Windows (use "tar xvf" commands for Linux/Solaris)
Add path to appropriate activemq*.jar to java classpath in FIXEdge1/conf/jms-ta-distribution/etc/JVM_Options.jvmopts file e.g.:
Code Block title JVM_Options.jvmopts Windows: -Djava.class.path=(...);FixEdge1/conf/jms-ta-distribution/tool/lib/activemq-all-5.3.2.jar; Linux: -Djava.class.path=(...);../FixEdge1/conf/jms-ta-distribution/tool/lib/activemq-all-5.3.2.jar;
Note title Note The ActiveMQ library could be found at activemq.apache.org
Download original package and extract "activemq-all-x.x.x.jar" into ../FixEdge1/conf/jms-ta-distribution/tool/lib/Configure paths to logs in FIXEdge1/conf/jms-ta-distribution/etc/log4j.properties. Paths to logs directory must be absolute.
Configure JMS adapter in FIXEdge.properties.
Add TransportLayer.JMSTA to TransportLayer.TransportAdapters, so as a result you should get "TransportLayer.TransportAdapters = TransportLayer.JMSTA"
And add JMS session parameters, for example:Code Block language py title FIXEdge.properties # Transport Layer Section TransportLayer.TransportAdapters = TransportLayer.JMSTA TransportLayer.JMSTA.Description = JMS Transport Adaptor TransportLayer.JMSTA.DllName = bin/jmsTADll-vc10-MD-x64.dll // Use libJMSTA.so for Linux TransportLayer.JMSTA.JVMOptionsFile = FixEdge1/conf/JVM_Options.jvmopts // Use ../FixEdge1/conf/JVM_Options.jvmopts for Linux TransportLayer.JMSTA.ConnectionNames = Connection1 TransportLayer.JMSTA.ClientNames = ProducerSession, ConsumerSession TransportLayer.JMSTA.Connection.Connection1.InitialContextFactory = org.apache.activemq.jndi.ActiveMQInitialContextFactory TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://10.17.12.244:61616 TransportLayer.JMSTA.Connection.Connection1.User = test TransportLayer.JMSTA.Connection.Connection1.Password = test TransportLayer.JMSTA.Connection.Connection1.ConnectionFactory = queueConnectionFactory TransportLayer.JMSTA.Connection.Connection1.Reconnect = false TransportLayer.JMSTA.Connection.Connection1.ReconnectTries = 3 TransportLayer.JMSTA.Connection.Connection1.ReconnectInterval = 500 TransportLayer.JMSTA.Client.ProducerSession.ConnectionName = Connection1 TransportLayer.JMSTA.Client.ProducerSession.StorageDir = ../FixEdge1/log TransportLayer.JMSTA.Client.ProducerSession.SessionType = Producer TransportLayer.JMSTA.Client.ProducerSession.MessagingMode = Queue TransportLayer.JMSTA.Client.ProducerSession.DestinationURI = MyQueue TransportLayer.JMSTA.Client.ProducerSession.DeliveryMode = NoPersist TransportLayer.JMSTA.Client.ProducerSession.TimeToLive = 100000 TransportLayer.JMSTA.Client.ProducerSession.SessionAckMode = Auto TransportLayer.JMSTA.Client.ProducerSession.MessageType = Text TransportLayer.JMSTA.Client.ProducerSession.Transacted = true TransportLayer.JMSTA.Client.ProducerSession.DurableSubscription = false TransportLayer.JMSTA.Client.ProducerSession.DurableSubscriptionName = DurableTest TransportLayer.JMSTA.Client.ConsumerSession.ConnectionName = Connection1 TransportLayer.JMSTA.Client.ConsumerSession.StorageDir = ../FixEdge1/log TransportLayer.JMSTA.Client.ConsumerSession.SessionType = Consumer TransportLayer.JMSTA.Client.ConsumerSession.MessagingMode = Queue TransportLayer.JMSTA.Client.ConsumerSession.DestinationURI = MyQueue TransportLayer.JMSTA.Client.ConsumerSession.DeliveryMode = NoPersist TransportLayer.JMSTA.Client.ConsumerSession.TimeToLive = 100000 TransportLayer.JMSTA.Client.ConsumerSession.SessionAckMode = Auto TransportLayer.JMSTA.Client.ConsumerSession.MessageType = Text TransportLayer.JMSTA.Client.ConsumerSession.Transacted = false TransportLayer.JMSTA.Client.ConsumerSession.DurableSubscription = false TransportLayer.JMSTA.Client.ConsumerSession.DurableSubscriptionName = DurableTest
Note: TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://10.17.12.244:61616 - host:port of Apache ActiveMQ Message Broker.
According to this configuration, FIXEdge will establish connection (Connection1) with ActiveMQ on 10.17.12.244:61616. This connection will be used by two JMS sessions: ProducerSession will receive FIX messages and send converted messages into MyQueue queue of ActiveMQ (producer session), ConsumerSession will receive JMS messages from MyQueue queue of ActiveMQ and convert them into FIX (consumer session).
Use FixEdge1/conf/BL_Config.xml as Business Layer Rules configuration file.
According to that BL rule and to JMS adapter configuration: FIX messages from FIXCLIENT1 will be converted into JMS and sent to ActiveMQ using producer session JMSPTestSession, then consumers session JMSPTestSession2 will get these JMS messages from ActiveMQ, convert it back to FIX and send messages to FIXCLIENT2.- ActiveMQ configuration (You can get it from official site).
In conf/activemq.xml add <destination> to <broker> section:
Code Block language xml title conf/activemq.xml <destinations> <queue physicalName="MyQueue" /> </destinations>
Start ActiveMQ using bin/activemq.bat
Enable UnregisteredAcceptors in FixEdge1/conf/engine.properties (UnregisteredAcceptor.CreateSession = true)
Start FIXEdge
Start, for example, SimpleClient (or HSBC tool) and establish FIXCLIENT1-FIXEDGE, FIXCLIENT2-FIXEDGE sessions with FIXEdge
Send FIX messages to FIXCLIENT1-FIXEDGE session
Messages from FIXCLIENT1-FIXEDGE session should be received in FIXCLIENT2-FIXEDGE Session
Open ActiveMQ admin console. Messages Enqueued and Messages Dequeued counters on Queues and Topics page should be changing with each sent message.
...