Search in sources :

Example 1 with IConfig

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

the class TestConsumeMQTT 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)

Example 2 with IConfig

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

the class TestPublishAndSubscribeMqttIntegration 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)

Example 3 with IConfig

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

the class TestPublishMqttSSL 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.put(BrokerConstants.SSL_PORT_PROPERTY_NAME, "8883");
    configProps.put(BrokerConstants.JKS_PATH_PROPERTY_NAME, "src/test/resources/localhost-ks.jks");
    configProps.put(BrokerConstants.KEY_STORE_PASSWORD_PROPERTY_NAME, "localtest");
    configProps.put(BrokerConstants.KEY_MANAGER_PASSWORD_PROPERTY_NAME, "localtest");
    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) MqttTestUtils.createSslProperties(org.apache.nifi.processors.mqtt.common.MqttTestUtils.createSslProperties)

Example 4 with IConfig

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

the class TestConsumeMqttSSL 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.put(BrokerConstants.SSL_PORT_PROPERTY_NAME, "8883");
    configProps.put(BrokerConstants.JKS_PATH_PROPERTY_NAME, "src/test/resources/localhost-ks.jks");
    configProps.put(BrokerConstants.KEY_STORE_PASSWORD_PROPERTY_NAME, "localtest");
    configProps.put(BrokerConstants.KEY_MANAGER_PASSWORD_PROPERTY_NAME, "localtest");
    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) MqttTestUtils.createSslProperties(org.apache.nifi.processors.mqtt.common.MqttTestUtils.createSslProperties) Properties(java.util.Properties)

Example 5 with IConfig

use of io.moquette.server.config.IConfig 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)5 IConfig (io.moquette.server.config.IConfig)5 MemoryConfig (io.moquette.server.config.MemoryConfig)5 Properties (java.util.Properties)5 MqttTestUtils.createSslProperties (org.apache.nifi.processors.mqtt.common.MqttTestUtils.createSslProperties)2