clebertsuconic commented on a change in pull request #3714:
URL: https://github.com/apache/activemq-artemis/pull/3714#discussion_r701412301



##########
File path: 
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManagerFactory.java
##########
@@ -41,11 +46,16 @@
    private final Map<String, MQTTConnection> connectedClients  = new 
ConcurrentHashMap<>();
    private final Map<String, MQTTSessionState> sessionStates = new 
ConcurrentHashMap<>();
 
+   private long defaultMqttSessionExiryInterval = 
TransportConstants.DEFAULT_DEFAULT_MQTT_SESSION_EXPIRY_INTERVAL;
+
    @Override
    public ProtocolManager createProtocolManager(ActiveMQServer server,
                                                 final Map<String, Object> 
parameters,
                                                 List<BaseInterceptor> 
incomingInterceptors,
                                                 List<BaseInterceptor> 
outgoingInterceptors) throws Exception {
+      if 
(parameters.containsKey(TransportConstants.DEFAULT_MQTT_SESSION_EXPIRY_INTERVAL))
 {
+         defaultMqttSessionExiryInterval = 
Long.parseLong((String)parameters.get(TransportConstants.DEFAULT_MQTT_SESSION_EXPIRY_INTERVAL));

Review comment:
       What happens when you have multiple Protocol managers? which one will 
take the expiryInterval?
   




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to