While I could not repeat FIX messages in my setup I was able to "repeat" them using unit tests and using my own simple acceptor with examples from the QuickFIX/J manual.
I have created a simple acceptor with the "FooApplication" to receive messages and answer/mock some QuoteRequests
public static void main(String[] args) throws Exception {
// FooApplication is your class that implements the Application interface
FooApplication application = new FooApplication();
SessionSettings settings = new SessionSettings(new FileInputStream(fileName));
MessageStoreFactory storeFactory = new FileStoreFactory(settings);
LogFactory[] logFactories = new LogFactory[] {new FileLogFactory(settings)};
LogFactory logFactory = new CompositeLogFactory(logFactories);
MessageFactory messageFactory = new DefaultMessageFactory();
Acceptor acceptor = new SocketAcceptor(application, storeFactory, settings, logFactory, messageFactory);
acceptor.start();
}
Then using unit tests I initiate a FooInitiator and call for example the sendLogout() from the FooClient
public class FooClient extends quickfix.fix42.MessageCracker implements quickfix.Application {
// sendQuoteRequest
// sendNewOrderSingle
private boolean sendMessage(Message message) {
boolean result = false;
try {
result = Session.sendToTarget(message, session);
} catch (SessionNotFound e) {
logger.error("FooApplication SessionNotFound", e);
result = false;
}
return result;
}
public boolean sendLogout() {
return sendMessage(new Logout());
}
}
If you are looking at FIX messages logs perhaps you might want to check in case you don't know HermesJMS its free and open source.