diff --git a/broker/src/main/java/org/eclipse/moquette/spi/persistence/MapDBPersistentStore.java b/broker/src/main/java/org/eclipse/moquette/spi/persistence/MapDBPersistentStore.java index 3f9d1c59..752219f0 100644 --- a/broker/src/main/java/org/eclipse/moquette/spi/persistence/MapDBPersistentStore.java +++ b/broker/src/main/java/org/eclipse/moquette/spi/persistence/MapDBPersistentStore.java @@ -81,7 +81,10 @@ public class MapDBPersistentStore implements IMessagesStore, ISessionsStore { File tmpFile; try { tmpFile = new File(m_storePath); - tmpFile.createNewFile(); + boolean fileAlreadyExists = tmpFile.createNewFile(); + if (fileAlreadyExists) { + LOG.warn("File [{}] already exists", m_storePath); + } } catch (IOException ex) { LOG.error(null, ex); throw new MQTTException("Can't create temp file for subscriptions storage [" + m_storePath + "]", ex);