activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: Don't generate unnecessary ID's on divert
Date Mon, 26 Sep 2016 17:35:47 GMT
Don't generate unnecessary ID's on divert


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/056920e6
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/056920e6
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/056920e6

Branch: refs/heads/master
Commit: 056920e6ab86c21b2701e32a7e6c4bfb1788ef92
Parents: 061ca9c
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Wed Sep 14 15:32:21 2016 +0300
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Sep 26 13:35:30 2016 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/core/server/impl/DivertImpl.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/056920e6/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
index 4316a98..ad24a44 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
@@ -83,12 +83,11 @@ public class DivertImpl implements Divert {
          logger.trace("Diverting message " + message + " into " + this);
       }
 
-      long id = storageManager.generateID();
-
       ServerMessage copy = null;
 
       // Shouldn't copy if it's not routed anywhere else
       if (!forwardAddress.equals(message.getAddress())) {
+         long id = storageManager.generateID();
          copy = message.copy(id);
 
          // This will set the original MessageId, and the original address


Mime
View raw message