Search in sources :

Example 6 with MemoryConfig

use of io.moquette.server.config.MemoryConfig in project nifi by apache.

the class TestPublishMQTT method startServer.

private void startServer() throws IOException {
    MQTT_server = new Server();
    final Properties configProps = new Properties();
    configProps.put(BrokerConstants.WEB_SOCKET_PORT_PROPERTY_NAME, "1884");
    configProps.setProperty(PERSISTENT_STORE_PROPERTY_NAME, "./target/moquette_store.mapdb");
    IConfig server_config = new MemoryConfig(configProps);
    MQTT_server.startServer(server_config);
}
Also used : IConfig(io.moquette.server.config.IConfig) Server(io.moquette.server.Server) MemoryConfig(io.moquette.server.config.MemoryConfig) Properties(java.util.Properties)

Aggregations

Server (io.moquette.server.Server)6 MemoryConfig (io.moquette.server.config.MemoryConfig)6 Properties (java.util.Properties)6 IConfig (io.moquette.server.config.IConfig)5 MqttTestUtils.createSslProperties (org.apache.nifi.processors.mqtt.common.MqttTestUtils.createSslProperties)2 IAuthorizator (io.moquette.spi.security.IAuthorizator)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)1