コード例 #1
0
ファイル: amqpbus.py プロジェクト: lamikae/amqpbus-recipe
 def _init_consumer(self):
     Consumer.__init__(self,
         connection=self.amqp_connection,
         exchange=self.exchange_name,
         exchange_type="topic",
         queue=self.req_queue_name,
         )
     # register the callback method
     self.register_callback(self._request_filter) # calls "dispatch"
     self._stop = Event()
     self._stop.set() # set to stopped state
コード例 #2
0
ファイル: messaging.py プロジェクト: jab/melkman
 def __init__(self, channel, context):
     queue = 'eb_%s' % uuid1().hex
     Consumer.__init__(self, context.broker,
                       exchange=_exchange_for_channel(channel),
                       queue=queue)
コード例 #3
0
ファイル: messaging.py プロジェクト: jab/melkman
 def __init__(self, message_type, queue, context):
     Consumer.__init__(self, context.broker, routing_key=message_type, queue=queue)