def ping(name):
    producer = getUtility(IProducer, name=name)
    producer._register()
    producer.publish('PING')
    logger.debug('PING....')
 def on_message_received(self, channel, method_frame, header_frame, body):
     channel.basic_ack(delivery_tag=method_frame.delivery_tag)
     if self._tx_select:
         channel.tx_commit()  # min support for transactional channel
     logger.debug('....PONG')