2015-02-05 21:08:18 +01:00
|
|
|
@GrabResolver(name='moquette-bintray', root='http://dl.bintray.com/andsel/maven/')
|
2016-01-17 13:04:45 +01:00
|
|
|
@Grab(group='io.moquette', module='moquette-broker', version='0.8')
|
2015-02-05 21:08:18 +01:00
|
|
|
|
2015-11-20 20:54:27 +01:00
|
|
|
import io.moquette.server.Server
|
2015-02-05 21:08:18 +01:00
|
|
|
|
|
|
|
|
println "Starting broker in embedded mode"
|
|
|
|
|
Server server = new Server()
|
|
|
|
|
//Properties props = [port: 1883, host: "0.0.0.0", 'password_file': '../broker/config/password_file.conf'] as Properties
|
|
|
|
|
Properties props = new Properties()
|
|
|
|
|
props.setProperty('port', '1883')
|
|
|
|
|
props.setProperty('host', "0.0.0.0")
|
|
|
|
|
props.setProperty('password_file', '../broker/config/password_file.conf')
|
|
|
|
|
println "starting proprs $props"
|
|
|
|
|
server.startServer(props)
|
|
|
|
|
println "Stopping broker.."
|
|
|
|
|
server.stopServer()
|