activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [1/2] activemq-artemis git commit: NO-JIRA Send MQTT WILL outside of Server Session
Date Sat, 18 Feb 2017 13:39:11 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 06688f5c3 -> 64b55778a


NO-JIRA Send MQTT WILL outside of Server Session


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

Branch: refs/heads/master
Commit: 8b51ec27db2e201c604e8178a574e344d73b033f
Parents: 06688f5
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Sat Feb 18 13:31:57 2017 +0000
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Sat Feb 18 13:31:57 2017 +0000

----------------------------------------------------------------------
 .../artemis/core/protocol/mqtt/MQTTPublishManager.java        | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8b51ec27/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
index 76f15c0..f0385dc 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
@@ -161,7 +161,12 @@ public class MQTTPublishManager {
 
             Transaction tx = session.getServerSession().newTransaction();
             try {
-               session.getServerSession().send(tx, serverMessage, true, false);
+               if (internal) {
+                  session.getServer().getPostOffice().route(serverMessage, tx, true);
+               } else {
+                  session.getServerSession().send(tx, serverMessage, true, false);
+               }
+
                if (retain) {
                   boolean reset = payload instanceof EmptyByteBuf || payload.capacity() ==
0;
                   session.getRetainMessageManager().handleRetainedMessage(serverMessage,
topic, reset, tx);


Mime
View raw message