Changed default behaviour to use persistent sotre, now use in memory as default and not FS moquette.mapdb (Fix issue #242)
This commit is contained in:
@@ -2,6 +2,8 @@ Version 0.9:
|
|||||||
Moved canRead check to topic from publish phase to subscribe (#144)
|
Moved canRead check to topic from publish phase to subscribe (#144)
|
||||||
Added javadoc and src jars creations for JCenter/Maven central
|
Added javadoc and src jars creations for JCenter/Maven central
|
||||||
Added persisting of clean session flag for already existing client session (fix issue #145)
|
Added persisting of clean session flag for already existing client session (fix issue #145)
|
||||||
|
Moved the message logic management fo FSM, to better control the concurrency.
|
||||||
|
Changed default config to use in memory store and not default moquette.mapdb
|
||||||
|
|
||||||
Version 0.8:
|
Version 0.8:
|
||||||
Introduced authenticator and authorizator implementations.
|
Introduced authenticator and authorizator implementations.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public abstract class IConfig {
|
|||||||
setProperty(BrokerConstants.HOST_PROPERTY_NAME, BrokerConstants.HOST);
|
setProperty(BrokerConstants.HOST_PROPERTY_NAME, BrokerConstants.HOST);
|
||||||
//setProperty(BrokerConstants.WEB_SOCKET_PORT_PROPERTY_NAME, Integer.toString(BrokerConstants.WEBSOCKET_PORT));
|
//setProperty(BrokerConstants.WEB_SOCKET_PORT_PROPERTY_NAME, Integer.toString(BrokerConstants.WEBSOCKET_PORT));
|
||||||
setProperty(BrokerConstants.PASSWORD_FILE_PROPERTY_NAME, "");
|
setProperty(BrokerConstants.PASSWORD_FILE_PROPERTY_NAME, "");
|
||||||
setProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME, BrokerConstants.DEFAULT_PERSISTENT_PATH);
|
//setProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME, BrokerConstants.DEFAULT_PERSISTENT_PATH);
|
||||||
setProperty(BrokerConstants.ALLOW_ANONYMOUS_PROPERTY_NAME, Boolean.TRUE.toString());
|
setProperty(BrokerConstants.ALLOW_ANONYMOUS_PROPERTY_NAME, Boolean.TRUE.toString());
|
||||||
setProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME, "");
|
setProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME, "");
|
||||||
setProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME, "");
|
setProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME, "");
|
||||||
|
|||||||
@@ -47,28 +47,22 @@ public class ConfigurationClassLoaderTest implements IAuthenticator, IAuthorizat
|
|||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
m_server.stopServer();
|
m_server.stopServer();
|
||||||
File dbFile = new File(m_config.getProperty(BrokerConstants.PERSISTENT_STORE_PROPERTY_NAME));
|
|
||||||
if (dbFile.exists()) {
|
|
||||||
dbFile.delete();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void loadAuthenticator() throws Exception {
|
public void loadAuthenticator() throws Exception {
|
||||||
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
||||||
props.setProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME, "io.moquette.server.ConfigurationClassLoaderTest");
|
props.setProperty(BrokerConstants.AUTHENTICATOR_CLASS_NAME, getClass().getName());
|
||||||
startServer(props);
|
startServer(props);
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
m_server.stopServer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void loadAuthorizator() throws Exception {
|
public void loadAuthorizator() throws Exception {
|
||||||
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
||||||
props.setProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME, "io.moquette.server.ConfigurationClassLoaderTest");
|
props.setProperty(BrokerConstants.AUTHORIZATOR_CLASS_NAME, getClass().getName());
|
||||||
startServer(props);
|
startServer(props);
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
m_server.stopServer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -36,6 +36,12 @@ websocket_port 8080
|
|||||||
#*********************************************************************
|
#*********************************************************************
|
||||||
host 0.0.0.0
|
host 0.0.0.0
|
||||||
|
|
||||||
|
#*********************************************************************
|
||||||
|
# The file for the persistent store, if not specified, use just memory
|
||||||
|
# no physical persistence
|
||||||
|
#*********************************************************************
|
||||||
|
#persistent_store ./moquette_store.mapdb
|
||||||
|
|
||||||
#*********************************************************************
|
#*********************************************************************
|
||||||
# acl_file:
|
# acl_file:
|
||||||
# defines the path to the ACL file relative to moquette home dir
|
# defines the path to the ACL file relative to moquette home dir
|
||||||
|
|||||||
Reference in New Issue
Block a user