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 {: ...@@ -11,10 +11,10 @@ Transformation maps String s to String {:
return s + "postfix"; return s + "postfix";
:} :}
// dependency definitions // dependency definitions not needed for incremental evaluation
A.OutputOnA canDependOn A.Input as dependencyA ; //A.OutputOnA canDependOn A.Input as dependencyA ;
B.OutputOnB canDependOn A.Input as dependencyB ; //B.OutputOnB canDependOn A.Input as dependencyB ;
C.OutputOnC canDependOn A.Input as dependencyC ; //C.OutputOnC canDependOn A.Input as dependencyC ;
// --- relational case --- // --- relational case ---
send SenderRoot.Alfa ; send SenderRoot.Alfa ;
......
...@@ -52,8 +52,19 @@ public class MinimalMain { ...@@ -52,8 +52,19 @@ public class MinimalMain {
// static MinimalReceiver receiver = null; // static MinimalReceiver receiver = null;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
boolean brokerReady;
try {
publisher = new MqttHandler("publisher").setHost("localhost"); publisher = new MqttHandler("publisher").setHost("localhost");
publisher.waitUntilReady(2, SECONDS); 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()); publisher.publish("---", ("Start at " + Instant.now()).getBytes());
// mainIncremental(); // mainIncremental();
...@@ -74,12 +85,13 @@ public class MinimalMain { ...@@ -74,12 +85,13 @@ public class MinimalMain {
B b1 = normalA.getB(0); B b1 = normalA.getB(0);
B b2 = normalA.getB(1); B b2 = normalA.getB(1);
// a.OutputOnA -> a.Input // dependency definitions not needed for incremental evaluation
normalA.addDependencyA(normalA); // // a.OutputOnA -> a.Input
// b1.OutputOnB -> a.Input // normalA.addDependencyA(normalA);
b1.addDependencyB(normalA); // // b1.OutputOnB -> a.Input
// b2.OutputOnB -> a.Input // b1.addDependencyB(normalA);
b2.addDependencyB(normalA); // // b2.OutputOnB -> a.Input
// b2.addDependencyB(normalA);
normalA.connectInput(TOPIC_URI_FOR_INPUT); normalA.connectInput(TOPIC_URI_FOR_INPUT);
normalA.connectOutputOnA("mqtt://localhost/normalA/out", true); 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