To implement the geofencing use case, we use the following components to build and develop it.
Implementing the case study
Building the data simulator
Before generating the real-time data of the vehicle, we need to have the starting point of the vehicle. Following is the code snippet to the generate data:
package com.book.simulator;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Random;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;
import com.book.domain.Location;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind...