You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/03/13 18:21:10 UTC

[1/2] flex-blazeds git commit: #2 - Fixed bug with flushing messages to polling client. - Applied suggested changes

Repository: flex-blazeds
Updated Branches:
  refs/heads/develop 43f1b956a -> a6a313f4e


#2 - Fixed bug with flushing messages to polling client.
 - Applied suggested changes

 Even if I can't 100 percent confirm that the changes do what the patch should do, it does look suspicious that the first message in the queue seems to force the throttling rules, with this patch this should make a little more sense.


Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/20346175
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/20346175
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/20346175

Branch: refs/heads/develop
Commit: 2034617524139e23e920b8ce60bffae20d13cbee
Parents: bf2e1dc
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Mar 13 18:18:28 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Mar 13 18:18:28 2016 +0100

----------------------------------------------------------------------
 .../client/FlexClientOutboundQueueProcessor.java  | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/20346175/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java b/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
index 19cf19e..71a5c7e 100644
--- a/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
+++ b/core/src/flex/messaging/client/FlexClientOutboundQueueProcessor.java
@@ -194,21 +194,25 @@ public class FlexClientOutboundQueueProcessor
                     continue;
                 }
 
-                messageClient = messageClient == null? getMessageClient(message) : messageClient;
+                // If no message client was explicitly provided, get the message client from
+                // the current message.
+                MessageClient messageClientForCurrentMessage = messageClient == null ?
+                        getMessageClient(message) : messageClient;
 
                 // First, apply the destination level outbound throttling.
-                ThrottleResult throttleResult = throttleOutgoingDestinationLevel(messageClient, message, false);
+                ThrottleResult throttleResult =
+                        throttleOutgoingDestinationLevel(messageClientForCurrentMessage, message, false);
                 Result result = throttleResult.getResult();
 
                 // No destination level throttling; check destination-client level throttling.
                 if (Result.OK == result)
                 {
-                    throttleResult = throttleOutgoingClientLevel(messageClient, message, false);
+                    throttleResult = throttleOutgoingClientLevel(messageClientForCurrentMessage, message, false);
                     result = throttleResult.getResult();
                     // If no throttling, simply add the message to the list.
                     if (Result.OK == result)
                     {
-                        updateMessageFrequencyOutgoing(messageClient, message);
+                        updateMessageFrequencyOutgoing(messageClientForCurrentMessage, message);
                         if (messagesToFlush == null)
                             messagesToFlush = new ArrayList<Message>();
                         messagesToFlush.add(message);
@@ -238,7 +242,8 @@ public class FlexClientOutboundQueueProcessor
      */
     public boolean isMessageExpired(Message message)
     {
-        return (message.getTimeToLive() > 0 && (System.currentTimeMillis() - message.getTimestamp()) >= message.getTimeToLive());
+        return (message.getTimeToLive() > 0 &&
+                (System.currentTimeMillis() - message.getTimestamp()) >= message.getTimeToLive());
     }
 
     /**
@@ -250,7 +255,8 @@ public class FlexClientOutboundQueueProcessor
      * parts of regular throttling code is skipped.
      * @return The result of throttling attempt.
      */
-    protected ThrottleResult throttleOutgoingDestinationLevel(MessageClient msgClient, Message message, boolean buffered)
+    protected ThrottleResult throttleOutgoingDestinationLevel(
+            MessageClient msgClient, Message message, boolean buffered)
     {
         ThrottleManager throttleManager = getThrottleManager(msgClient);
         if (throttleManager != null)


[2/2] flex-blazeds git commit: Merge remote-tracking branch 'origin/develop' into develop

Posted by cd...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/a6a313f4
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/a6a313f4
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/a6a313f4

Branch: refs/heads/develop
Commit: a6a313f4e6dc7028cb52593506906fbe32e86324
Parents: 2034617 43f1b95
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Mar 13 18:18:54 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Mar 13 18:18:54 2016 +0100

----------------------------------------------------------------------
 .gitignore         |   5 +-
 build.properties   |  24 +++--
 build.xml          | 138 +++++++++++--------------
 common/build.xml   |   6 +-
 core/build.xml     |  24 +++--
 downloads.xml      | 265 ++++++++++++++++++------------------------------
 opt/build.xml      |  79 +++++----------
 proxy/build.xml    |  12 +--
 remoting/build.xml |   8 +-
 sdk/build.xml      |   4 +-
 10 files changed, 229 insertions(+), 336 deletions(-)
----------------------------------------------------------------------