Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A67BD200CF6 for ; Mon, 18 Sep 2017 15:40:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A50FE1609DB; Mon, 18 Sep 2017 13:40:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E22781609D8 for ; Mon, 18 Sep 2017 15:40:39 +0200 (CEST) Received: (qmail 67375 invoked by uid 500); 18 Sep 2017 13:40:39 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 67362 invoked by uid 99); 18 Sep 2017 13:40:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2017 13:40:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 88211F3304; Mon, 18 Sep 2017 13:40:38 +0000 (UTC) From: jbertram To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #1539: MQTT work Content-Type: text/plain Message-Id: <20170918134038.88211F3304@git1-us-west.apache.org> Date: Mon, 18 Sep 2017 13:40:38 +0000 (UTC) archived-at: Mon, 18 Sep 2017 13:40:40 -0000 Github user jbertram commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1539#discussion_r139424530 --- Diff: artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java --- @@ -172,4 +177,8 @@ public void invokeIncoming(MqttMessage mqttMessage, MQTTConnection connection) { public void invokeOutgoing(MqttMessage mqttMessage, MQTTConnection connection) { super.invokeInterceptors(this.outgoingInterceptors, mqttMessage, connection); } + + public Map getConnectedClients() { + return connectedClients; --- End diff -- If I returned an immutable view of the map then I wouldn't be able to actually update it which would break org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager#validateClientId. I could add a new method (e.g. addConnectedClient(String, MQTTConnection)), but I don't see much benefit of doing that over what's happening now. ---