I need to continue the FIX Session starting from the specific message sequence number, but I have deleted the log files from the previous runs. How can I do this?

You can use session InSeqNum and OutSeqNum properties to set the start sequence numbers before establishing the session.

Can I have multiple session objects per engine?

Yes, you can have multiple session objects per engine instance.

What is the thread model for individual session object: are incoming events all sent from the same thread?

Yes, all incoming events related to a particular session are sent from the same thread.

Can session event listeners be heavyweight? I.e. would I be looking to fork a thread to avoid holding up receipt of further events?

It is important to avoid time-consuming tasks inside session event handlers. Thus, you should fork a thread and listener can't be heavyweight.

How can I send non-ASCII text field values (i.g. Arabic)?

The fields that start with the "Encoded" prefix should be used.

For example:

During message creation the following approach can be used:

final String text = "string using local charset";
final byte[] encodedText = text.getBytes();
order.set(Tag.EncodedTextLen, encodedText.length);
order.set(Tag.EncodedText, encodedText);

During message processing the following approach can be used:

final byte[] encodedText = order.getBytes(Tag.EncodedText);
final String charset = "cp1251";
final String text = new String(encodedText, charset);

How can I change value of the SendingTime(52) field in the outgoing message?

By default the FIX Engine automatically sets the SendingTime(52) field value to the current date and time using GMT+0 time zone.

This can be overridden in the session listener.

public class SendingTimeModificator implements Session.OutboundApplicationMessageListener {
    public static void main(String[] args) {
        final Engine engine = Engine.init();
        final Session session = new Session("InitiatorCompId", "AcceptorCompId", Version.FIX50_SP2);
        session.setOutboundApplicationMessageListener(new SendingTimeModificator());
    public void onOutboundApplicationMessage(Object sender, Session.OutboundApplicationMessageArgs args) {
        final Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT+5"));
        final String sendingTime = String.format("%1$tY%1$tM%1$td-%1$tH:%1$tm:%1$tS.%1$tL", calendar);
        final Message message = args.getMsg();
        message.set(Tag.SendingTime, sendingTime);

Meaning of "Cannot logon: after sending the initial Logon message the telecommunication link error is detected (closed by the counterparty)."

It means that the TCP connection was established and the initial Logon (MsgType=A) FIX message was sent, but after that the TCP connection was closed by the counterparty.

So we would recommend to contact your counterparty FIX support team and provide them with your FIX message log file (*.summary) and ask them what you need to change (if anything) in your initial Logon (MsgType=A) in order to establish the FIX session successfully.

Maybe they need to update the configuration settings on their side in order to accept your FIX connection (e.g. update login/password settings or the expected source IP address).

We need to connect to multiple exchanges (ICE, CME, LME) from the same engine instance. Can you tell me how I can achieve this?

The recommended approach is:

  • create a single configuration file containing
    • all required FIX dialects
    • engine-level settings
  • initialize the engine using configuration file
  • create session object for each destination
  • customize each session object properties depending on the requirements

How to limit the maximum resend request range?

For example, the CME has a restriction of not allowing client to ask for a resend span bigger than 2500 messages.

This can be achieved on the engine level:

final EngineSettings settings = new EngineSettings();
final Engine engine = Engine.init(settings);

Or on the session level:


The reference tickets are: JAVA-648.

How to create multiple sessions with the same SenderCompID and TargetCompID ?

You can specify different tokens for the sessions with the same SenderCompID and TargetCompID.

Please see parameter token of the following session constructor:

biz.onixs.fix.engine.Session.Session(String, String, Version, boolean, String)

How to change the order of tags in the FIX message ?

You should create corresponding dialect with the changed order of tags where "mode" of the messages set as "override". Please see also Dialect docs section.