In earlier sections, we learnt about various features provided by the Flink CEP engine. Now it's time to understand how we can use it in real-world solutions. For that, let's assume we work for a mechanical company which produces some products. In the product factory, there is a need to constantly monitor certain machines. The factory has already set up the sensors which keep on sending the temperature of the machines at a given time.
Now we will be setting up a system that constantly monitors the temperature value and generates an alert if the temperature exceeds a certain value.
We can use the following architecture:
Here we will be using Kafka to collect events from sensors. In order to write a Java application, we first need to create a Maven project and add the following dependency:
<!-- https://mvnrepository.com/artifact/org.apache.flink/flink-cep-scala_2.11 --> <dependency> <groupId>org...