Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

Implement resend abort when send() returns false

  • Explore the codebase and understand the resend flow
  • Modify the resendMessages method in Session.java to check the return value of send() and abort if it returns false
  • Add a warning log message when resend is aborted
  • Create and verify unit test that demonstrates the new behavior
  • Run SessionTest suite (71 tests) - all pass
  • Perform code review
  • Address review feedback: Use session log (getLog().onWarnEvent) instead of static LOG.warn
  • Address review feedback: Add JavaDoc comment for test method
  • Address review feedback: Fix issue reference to use GitHub issue URL format
  • Address review feedback: Simplify warning message
  • Complete implementation
Original prompt

Implement a change in the QuickFIX/J codebase so that resend operations abort when send(String messageString) returns false. Add a warning log message when this condition occurs. Also add a unit test that demonstrates the new behavior (i.e., resending stops/aborts after the first failed send).

Context:

Acceptance criteria:

  1. During a resend loop/batch, if send(String messageString) returns false, abort any further resends for that resend request.
  2. Emit a warning log entry when the resend is aborted due to send() returning false.
  3. Add/adjust a unit test that fails on current behavior and passes with the fix; the test should set up a resend scenario where send() returns false partway (or immediately) and assert that subsequent resend attempts are not performed.
  4. Ensure existing behavior remains unchanged when send() returns true.
  5. Keep the change minimal and localized to resend-related code paths.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement abort functionality for resend operations on send failure Abort resend when send() returns false (QFJ-646) Jan 13, 2026
Copilot AI requested a review from chrjohn January 13, 2026 15:52
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI requested a review from chrjohn January 21, 2026 12:13
@chrjohn chrjohn changed the title Abort resend when send() returns false (QFJ-646) Abort resend when send() returns false (QFJ-646) Jan 21, 2026
@chrjohn
Copy link
Member

chrjohn commented Jan 21, 2026

CI job currently failing due to #1120 , waiting for fix.

@chrjohn chrjohn changed the title Abort resend when send() returns false (QFJ-646) Abort resend when send() returns false Jan 21, 2026
@chrjohn chrjohn marked this pull request as ready for review January 21, 2026 19:53
@chrjohn chrjohn linked an issue Jan 22, 2026 that may be closed by this pull request
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI requested a review from chrjohn January 22, 2026 12:07
Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI requested a review from chrjohn January 22, 2026 16:44
Comment on lines 2407 to 2408
getLog().onWarnEvent("Resend aborted: send() returned false for message " + msgSeqNum);
// Abort resend operation immediately - don't send any more messages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Suggested change
getLog().onWarnEvent("Resend aborted: send() returned false for message " + msgSeqNum);
// Abort resend operation immediately - don't send any more messages
// Abort resend operation immediately - don't send any more messages
getLog().onWarnEvent("Resending messages aborted.");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied suggestion in commit 31bcb68. Changed log message to "Resending messages aborted." and moved comment to precede the log statement.

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI requested a review from chrjohn January 26, 2026 09:54
@chrjohn chrjohn added this to the QFJ 3.0.0 milestone Jan 26, 2026
@chrjohn chrjohn merged commit f9b1929 into master Jan 26, 2026
21 checks passed
@chrjohn chrjohn deleted the copilot/abort-resend-on-fail branch January 26, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop sending resend-messages when the responder has gone away

2 participants