base_rmq_consumer.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:EasyJobLite 作者: treebohotels 项目源码 文件源码
def start_connection(self):
        """
        reset the connection to rabbit mq
        :return: 
        """
        logger = logging.getLogger(self.__class__.__name__)
        logger.info("starting new rabbit mq connection")

        # todo: do we need to make confirm_publish configurable?
        self._conn = Connection(self.get_config().rabbitmq_url,
                                transport_options={'confirm_publish': True})

        # setup producer to push to error and dlqs
        self._producer = Producer(channel=self._conn.channel(),
                                  exchange=self._orchestrator.get_exchange())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号