def produceData(self):
     # self.produceInventoryDataFromFile(EventBackboneConfig.getInventoryTopicName())
     # self.produceReeferDataFromFile(EventBackboneConfig.getReeferTopicName())
     # self.produceTransportationDataFromFile(EventBackboneConfig.getTransportationTopicName())
     self.produceInventoryData(EventBackboneConfig.getInventoryTopicName())
     self.produceReeferData(EventBackboneConfig.getReeferTopicName())
     self.produceTransportationData(
         EventBackboneConfig.getTransportationTopicName())
Exemplo n.º 2
0
 def __init__(self):
     # logging.info("[ReeferConsumer] - Initializing the consumer")
     print("[ReeferConsumer] - Initializing the consumer")
     self.store = ReeferDataStore()
     self.cloudEvent_schema = avroUtils.getCloudEventSchema()
     self.kafkaconsumer = KafkaAvroConsumer(
         'ReeferConsumer', json.dumps(self.cloudEvent_schema.to_json()),
         EventBackboneConfig.getReeferTopicName(),
         EventBackboneConfig.getConsumerGroup(), AUTO_COMMIT)