Skip to content

Log pending messages #1291

Open

Description

@andreydp

There is a low visibility of a pending messages, e.g. when Session.sendToTarget() is invoked while FIX session is down. Message is only stored to the session storage, and not to the log.

Would like to expect the message to trigger something like onPending callback and be able to see actually assigned sequence number and sending time by the engine in this log.

It may be a major change to the current logging approach so open to discussion first :)

Activity

  1. added theissue type on Jul 30, 2026
  2. chrjohn commented on Jul 31, 2026

    @chrjohn
    Member

    Hi @andreydp , I think a callback is the least intrusive way to do this so anyone could decide whether to implement it or not.
    However, as a quick workaround you could extend your message store's set method to print that information. Maybe only if the session is not logged on...
    Cheers
    Chris

  3. chrjohn commented on Jul 31, 2026

    @chrjohn
    Member

    I don't know what your exact use case is. Maybe it helps to check the messages in the store, e.g. via SessionAdmin MBean, to get an overview of the messages and seqnums.

  4. andreydp commented on Jul 31, 2026

    @andreydp
    ContributorAuthor

    The use case is - it's required by the industry to store all messages for 7 years, even not sent to the client. Imagine situation when client disconnects before session end time, but application stil has some pending messages to sent. Then EndTime comes, session is reset and on StartTime those messages are lost.

  5. chrjohn commented on Jul 31, 2026

    @chrjohn
    Member

    The use case is - it's required by the industry to store all messages for 7 years, even not sent to the client. Imagine situation when client disconnects before session end time, but application stil has some pending messages to sent. Then EndTime comes, session is reset and on StartTime those messages are lost.

    Ok, then it has overlaps with #463 and/or #986

  6. aymenjamaaoui commented on Nov 15, 2026

    @aymenjamaaoui
    Contributor

    Hi, PR #1345 may help with the use case in this issue.

    It adds a new session setting KeepUnsentMessagesOnReset (default N). With Y, messages sent while the session is not logged on are not lost when the session is reset by its schedule (EndTime / StartTime). They are kept in the store with new sequence numbers. After the next logon, the other side asks for them with a ResendRequest, and they are sent again with PossDupFlag=Y.

    It works with MemoryStore, FileStore, CachedFileStore and JdbcStore (JdbcStore needs one extra table, SQL scripts are in the PR).

    It does not add an onPending callback or a log entry for these messages. That part of this issue is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions