Github user amitjoy commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1539#discussion_r139431943
--- 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<String, MQTTConnection> getConnectedClients() {
+ return connectedClients;
--- End diff --
I agree that this pattern has been followed in all the places .If the map
is only exposed to add entries to it, I feel it is always better to expose a
method to do the same otherwise the map can get misused.
---