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
  • 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

@Test
public void testResendAbortsWhenSendReturnsFalse() throws Exception {
// QFJ-646: Stop sending resend-messages when the responder has gone away
Copy link
Member

Choose a reason for hiding this comment

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

@copilot this comment should be removed and the correct issue should be added as a method comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed inline comment and added proper JavaDoc method comment for QFJ-646 in commit 6c07eae.

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
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