Skip to content

Conversation

@mustafatasli
Copy link

@mustafatasli mustafatasli commented Nov 3, 2025

Fix #

Description

Problem: In multipart SubmitSm (SAR) flows, the long-submit transaction Deferred returned by sendDataRequest() never reaches errback or callback when a timeout occurs, causing the consumer to stall and RabbitMQ unacked messages to accumulate.

Cause: The code called startLongSubmitSmTransaction() to create a Deferred, but the timeout handler erroneously either did not errback the same Deferred or used a bare Exception instead of Failure, so upstream code never resumed.

Fix:

Ensure startLongSubmitSmTransaction() returns the exact same Deferred stored in state.

Timeout handler cancels per-part timers and calls d.errback(Failure(SMPPRequestTimoutError(...))).

Guard callback/errback with if not d.called:.

Not yet Added unit test that simulates no responses for multipart and asserts Deferred fails with SMPPRequestTimoutError.

Impact: This fixes the message-consumer stall issue and ensures multipart flows either succeed or fail in finite time.

Please review and let me know if you’d like additional adjustments (e.g., config setting for timeout behaviour).

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

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.

2 participants