Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x 779a19d12 -> 7553e4860


NO-JIRA Send MQTT WILL outside of Server Session

(cherry picked from commit 8b51ec27db2e201c604e8178a574e344d73b033f)


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

Branch: refs/heads/1.x
Commit: 7553e4860cde869759cbb6baf11c5717c20fdc5f
Parents: 779a19d
Author: Martyn Taylor <[email protected]>
Authored: Sat Feb 18 13:31:57 2017 +0000
Committer: Martyn Taylor <[email protected]>
Committed: Sat Feb 18 13:39:55 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/7553e486/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 8fcf41d..161ee1d 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
@@ -158,7 +158,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);

Reply via email to