I'm acting as an acceptor. Is there a way to set sequence numbers manually?
The first idea I had, was to modify .seqnums files, but it does not work.
Google mentions existence of setNextSenderMsgSeqNum and setNextTargetMsgSeqNum methods, however I can't tell on which object I should call them (using quickfixj 1.4).
I'm aware that setting sequence numbers by hand is discouraged and there are bunch of flags like ResetOnLogon and ResetOnDisconnect, but I have no control over initiator and there are bunch of other acceptors (test-tools) which are using the same session.
Application myApp = new FIXSender();
settings = new SessionSettings(sessionConfig);
MessageFactory messageFactory = new MessageFactory();
MessageStoreFactory storeFactory = new FileStoreFactory(settings);
LogFactory logFactory = new FileLogFactory(settings);
Acceptor acceptor = new SocketAcceptor(myApp, storeFactory, settings, logFactory, messageFactory);
acceptor.start();
You can set the FIX fields, override the toAdmin callback
First of all you need to explore the quickfixJ code to see how it is done.
Secondly what is the reason to use such an old version of quickfixJ ? Why not upgrade to the most recent version.
Thirdly you should be very wary of changing sequence numbers if you don't understand properly how they are used in the communication. If you don't understand you are guaranteed to get into murky problems.
You can do something like
But before you do it, it is very important to understand how sequence numbers are used