def main(): # process GPS info producer.request(gps_info) print consumer.reply(__QUEUE__) # send msg # producer.request(send_data) # print consumer.reply(__QUEUE__, 60) # change config producer.request(set_new_config_a) print consumer.reply(__QUEUE__, 60)
def request(self, body): msg_request = Message("zeno_master_queue", "GPS", "Operation", body) producer.request(msg_request) consumer.reply(self.on_response)
def main(): # producer.reply(Message("GPS", "zeno_master_queue", "coordinates", "original message:and this is the reply")) # producer.reply(Message("GPS", "zeno_request_queue", "coordinates", "original message:1")) print consumer.reply("zeno_request_queue")