Search code examples
javaactivemq-classicfix-protocolquickfixj

Financial Information eXchange web platform (QuickFix/J)


I am only a few days familiar with FIX and i would appreciate some guidance on the below.

A trading system connected to an exchange is able to accept FIX messages for trading and market data request purposes. I am trying to build a FIX web platform using QuickFix/J which will be provided to numerous clients.

An ip and a port is provided to connect to the trading system's gateway and I am already provided with their valid message tags.

I have used QuickFix/J to build a local initiator and acceptor (standalone apps not web) to make my tests and send messages between the two points(INITIATOR>ACCEPTOR and ACCEPTOR>INITIATOR) and this works fine and i got the idea(more/less) how the messages are supposed to work. Also i have experimented to see how multiple sessions work and also this works out good for me. (1 acceptor - multiple initiators)

I am really confused when it comes to the point i need to move forward to the web app now. My questions:

  1. When connecting to the provided gateway what do i need to have running in order to send and receive FIX messages? initiator or acceptor or both? From my understanding: Initiator will be started and connect to the acceptor so in this case the gateway will be the acceptor or not?

  2. Let's say i want to provide this web platform to multiple clients and each connected client will have a dedicated session upon successful logon. If the acceptor is the actual server, how it will know about the client's session details? (SenderCompID and TargetCompID)

  3. Current architecture:

    • A dedicated server for running the trading system where the FIX client app will connect to and send/receive messages
    • The web app will create session to the trading system and will send/receive FIX messages
    • Suggestions for communications between server and web app? I was thinking to use activeMQ for message exchanging between the two points. Would this be a good idea?

I know that it's too much to ask but any opinion/suggestion will be greatly appreciated.

Thank you.

Updates:

  1. My biggest concern with activeMQ is actually the session management and if it's possible to develop such web app using amq to send/receive msgs between client-amq-trading platform. I have not used amq and quickfix/j in depth and i just want to be sure that it is actually possible to do this.
  2. Based on the above, do you believe that this architecture would work fine? architecture

Solution

    1. Not all counterparties run acceptors but all of the ones that I have ever worked with (50 or so) are so you will (probably) not need to run an acceptor.
    2. Usually each client has its own CompID pair, given by the counterparty, and it is those details that (uniquely) identify a client. You usually create a separate connection for each client in my experience.
    3. It depends on what trading volumes you are expecting but using activeMQ sounds viable. I would have thought that, unless you are working with high frequency trading or a lot of clients, you would need a separate dedicated server. In general I have used proprietary messaging layers to communicate between our clients and servers but that was more to do with the companies that I worked for than these systems not being fit for purpose.

    Disclaimer: my experience is in C# and C++ FIX development so I don't really know active MQ but based on comparisons it seems to be fine.