Interface FixSessionStore

All Known Implementing Classes:
FileSessionStore, FixSessionStore.InMemory

public interface FixSessionStore
Persistence seam for a FixSession: sequence numbers and the outbound application-message store. With a durable implementation (FileSessionStore) a session reconnects with sequence-number continuation — the peer's ResendRequest is then serviced from messages sent before the restart, which is what production counterparties expect.

Methods are invoked from the session's writer path (outgoing) and reader thread (incoming); implementations must be thread-safe.

  • Method Details

    • nextOutgoingSeq

      long nextOutgoingSeq()
      The next outgoing MsgSeqNum to use (1 for a fresh session).
    • expectedIncomingSeq

      long expectedIncomingSeq()
      The next incoming MsgSeqNum expected (1 for a fresh session).
    • saveOutgoingSeq

      void saveOutgoingSeq(long nextSeq)
    • saveIncomingSeq

      void saveIncomingSeq(long expectedSeq)
    • storeMessage

      void storeMessage(long seq, FixSessionStore.StoredMessage message)
    • retrieve

      FixSessionStore.StoredMessage retrieve(long seq)
      The stored message at seq, or null (admin / never sent).
    • inMemory

      static FixSessionStore inMemory()
      Fresh in-memory store: per-connection sequence numbers (the default).