Beispiel #1
0
 def run(self):
     if sys.argv[-1] == 'client':
         KafkaManager.instance().getTopic('test').open(WRITE).produce('abc')
         print 'one message be sent out'
     else:
         KafkaManager.instance().getTopic('test').open(READ)
         CoroutineApplication.run(self)
Beispiel #2
0
 def run(self):
     if sys.argv[-1] == 'client':
         AmqpManager.instance().getMessageQueue('test').open(AccessMode.WRITE).produce('abc')
         print 'one message be sent out'
         CoroutineApplication.run(self)
     else:
         AmqpManager.instance().getMessageQueue('test').open(AccessMode.READ)
         CoroutineApplication.run(self)
Beispiel #3
0
 def run(self):
     # AmqpManager.instance().getMessageQueue('mq_mess').open(AccessMode.READ)
     CoroutineApplication.run(self)
Beispiel #4
0
    def run(self):

        AmqpManager.instance().getMessageQueue('mq_2').open(AccessMode.WRITE)
        AmqpManager.instance().getMessageQueue('mq_3').open(AccessMode.WRITE)
        AmqpManager.instance().getMessageQueue('mq_1').open(AccessMode.READ)
        CoroutineApplication.run(self)