You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "pingww (via GitHub)" <gi...@apache.org> on 2023/05/29 01:33:41 UTC

[GitHub] [rocketmq-mqtt] pingww commented on a diff in pull request #194: [ISSUE #44] Support shared subscription

pingww commented on code in PR #194:
URL: https://github.com/apache/rocketmq-mqtt/pull/194#discussion_r1208742576


##########
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/session/infly/PushAction.java:
##########
@@ -163,6 +167,9 @@ public void write(Session session, Message message, int mqttId, int qos, Subscri
             if (subscription.isRetry()) {
                 message.setRetry(message.getRetry() + 1);
                 logger.warn("retryPush:{},{},{}", session.getClientId(), message.getMsgId(), message.getRetry());
+            } else if (subscription.isShare()) {
+                String lmqTopic = MixAll.LMQ_PREFIX + StringUtils.replace(message.getOriginTopic(), "/","%");
+                lmqQueueStore.popAck(lmqTopic, subscription.getSharedName(), message);

Review Comment:
   Why do you return ack directly after writing here? Isn’t it a success when the client returns ack?



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org