reta commented on code in PR #3546:
URL: https://github.com/apache/cxf/pull/3546#discussion_r4208900902


##########
rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java:
##########
@@ -401,6 +402,39 @@ protected boolean isSequenceSuspended(String key) {
         return suspendedCandidates.containsKey(key);
     }
 
+    /**
+     * Initiate the resend of the given candidate, after initiating the resend 
of any earlier message of the
+     * same sequence which is due no later than it and not pending yet. 
java.util.Timer does not run tasks
+     * scheduled for the same time in scheduling order, so for messages cached 
within the same millisecond
+     * the resend of a later message could otherwise run (and, with in-order 
delivery, block the resend
+     * thread until the receive timeout) before the resend of an earlier one.
+     *
+     * @param candidate the candidate whose resend is due
+     */
+    protected void initiateInOrder(ResendCandidate candidate) {
+        final Date due = candidate.getNext();
+        final List<ResendCandidate> earlier = new ArrayList<>();
+        if (null != due) {
+            String key = 
RMContextUtils.retrieveRMProperties(candidate.getMessage(), true)

Review Comment:
   Thanks @ffang , I think you are very right, JDK's timer is indeed bound by a 
single background thread, thank you for pointing it out.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to