I am using Quickfix/n library. I have acceptor running on 2 machines and one initiator. Currently I am getting issues with maintaining sequence number between initiator and acceptor when one of the acceptor goes down. For ex- Initiator is sending and receiving messages from acceptor which is on machine 1. Last SeqNum sent by acceptor on machine 1 was 5 when it went down. Now acceptor on machine 2 is connected but initiator is sending log out messages saying that MsgSeqNum is too low, expecting SeqNum 6 but receiving 1. So how do i ensure that acceptor on machine 2 will start from SeqNum 6 and not 1?
I think the only way this could work is if both Acceptors are using the same source for their message store.
If you are using a FileStore, then that file would have to be on a shared drive, with both Acceptors pointing to it.
Updated answer based on comment:
I didn't realize your acceptors were running simultaneously. (I don't know how that would work, though. How does the initiator get routed to the second acceptor when the first one dies?)
Parenthesized question aside, a custom DB store could work. It's pretty easy to implement the IMessageStore & IMessageStoreFactory interface. Both acceptors could point to the same DB; as long as they're not both writing to the same table at the same time then you should be good.
Doesn't have to be a DB, of course. Any persistent location that can allow two connections is fine. Just implement an IMessageStore to work with it.