def generate_data(self):
    with open(self.input_file) as f:
        data = json_load(f)
        for line in data:
            message = self.dict_to_binary(line)
            self.send(self.topic, message)
def generate_data(self):
    with open(self.input_file) as f:
        data = json_load(f)
        for line in data:
            message = self.dict_to_binary(line)
            self.send(self.topic, message)