Skip to content
Snippets Groups Projects
Commit 18597fcb authored by René Schöne's avatar René Schöne
Browse files

check mqtt broker, not use dependency defs

parent f8547ae6
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,10 @@ Transformation maps String s to String {:
return s + "postfix";
:}
// dependency definitions
A.OutputOnA canDependOn A.Input as dependencyA ;
B.OutputOnB canDependOn A.Input as dependencyB ;
C.OutputOnC canDependOn A.Input as dependencyC ;
// dependency definitions not needed for incremental evaluation
//A.OutputOnA canDependOn A.Input as dependencyA ;
//B.OutputOnB canDependOn A.Input as dependencyB ;
//C.OutputOnC canDependOn A.Input as dependencyC ;
// --- relational case ---
send SenderRoot.Alfa ;
......
......@@ -52,8 +52,19 @@ public class MinimalMain {
// static MinimalReceiver receiver = null;
public static void main(String[] args) throws Exception {
publisher = new MqttHandler("publisher").setHost("localhost");
publisher.waitUntilReady(2, SECONDS);
boolean brokerReady;
try {
publisher = new MqttHandler("publisher").setHost("localhost");
brokerReady = publisher.waitUntilReady(2, SECONDS);
} catch (IOException e) {
brokerReady = false;
}
if (!brokerReady) {
logger.fatal("MQTT broker on localhost not available. Exiting!");
return;
}
publisher.publish("---", ("Start at " + Instant.now()).getBytes());
// mainIncremental();
......@@ -74,12 +85,13 @@ public class MinimalMain {
B b1 = normalA.getB(0);
B b2 = normalA.getB(1);
// a.OutputOnA -> a.Input
normalA.addDependencyA(normalA);
// b1.OutputOnB -> a.Input
b1.addDependencyB(normalA);
// b2.OutputOnB -> a.Input
b2.addDependencyB(normalA);
// dependency definitions not needed for incremental evaluation
// // a.OutputOnA -> a.Input
// normalA.addDependencyA(normalA);
// // b1.OutputOnB -> a.Input
// b1.addDependencyB(normalA);
// // b2.OutputOnB -> a.Input
// b2.addDependencyB(normalA);
normalA.connectInput(TOPIC_URI_FOR_INPUT);
normalA.connectOutputOnA("mqtt://localhost/normalA/out", true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment