liurunyu
2025-08-06 c6ef837cf5882b050d2e38a77d7a1531a882328b
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/mqtt/MqttClientPool.java
@@ -13,8 +13,8 @@
    private final GenericObjectPool<MqttClient> pool;
    public MqttClientPool(String broker, String username, String password, int maxConnections) {
        MqttClientPooledObjectFactory factory = new MqttClientPooledObjectFactory(broker, username, password);
    public MqttClientPool(String broker, String username, String password, int maxConnections, boolean useMemoryPersistence) {
        MqttClientPooledObjectFactory factory = new MqttClientPooledObjectFactory(broker, username, password, useMemoryPersistence);
        GenericObjectPoolConfig<MqttClient> config = new GenericObjectPoolConfig<>();
        config.setMaxTotal(maxConnections);
        config.setMaxIdle(maxConnections);