Example #1
0
    def callback(self, ch, method, properties, body):
        msg = Message.Message().initFromJson(body)

        print('Recieved incoming message')
        print('Input File Name: ' + msg.dataSource)
        print('Input Type: ' + msg.input)
        print('Output Type: ' + msg.output)

        if msg.input != "StopConsuming":
            IncomingMessageHandler.IncomingMessageHandler().HandleMessage(
                msg.dataSource, msg.input, msg.output)
        else:
            print('*** consumer ending *** ')
            DBManager.closeConnections()
            ch.stop_consuming()