Right now we are only sending the messages to kafka using the "incident" topic. We have to add new topics so the dashboard can process the data received more easily.
Mi idea is the following. In the service that sends the data to kafka (KafkaService) we must call another service (this must be implemented) that receives an incident and returns the topic that must be used in kafka. It would be something like this (inside the KafkaService class):
public void sendToKafka(Incident incident) {
String message = this.toKafkaMessage(incident);
LOG.info("sending message='{}' to topic='{}'", message, topic);
List<String> topics = xxxxxxService.getTopicsOf(incident);
foreach topic in topics:
kafkaTemplate.send(topic, message);
}
These are the following topics we will use for now (more topics will be added later):
geolocated: if the incident has a "location" field
withOperator: if the incident has an operator assigned
sensor: if the agent sending the incident is a sensor
standard: if it doesn't have any of the attributes stated above.
Please note that a incident can have many topics (e.g. geolocated and sensor).
Right now we are only sending the messages to kafka using the "incident" topic. We have to add new topics so the dashboard can process the data received more easily.
Mi idea is the following. In the service that sends the data to kafka (KafkaService) we must call another service (this must be implemented) that receives an incident and returns the topic that must be used in kafka. It would be something like this (inside the KafkaService class):
These are the following topics we will use for now (more topics will be added later):
Please note that a incident can have many topics (e.g. geolocated and sensor).