有木有close呢,怎么感觉这个是pythone
解决方案 »
- PHP+ajax获取它页数据---急,在线等
- 菜鸟一问:utf8和gb2312在编码上有什么区别,用哪个好点,规范些?
- 有木有php+solr 的开源的项目
- centos下编译php需要的GD库
- 最近要做PHP和WebMethods的整合,不知道如何整?
- PHP正则
- JavaScript函数不能触发是什么原因
- 伪造HTTP_REFERER问题,看是简单,其实超难,200元求代码(可先付钱,后给代码)!
- 求大神们速速围观,这个编辑器叫什么????
- 莫名其妙的遇到了 #1136 - Column count doesn't match value count at row 1
- 合并的数组怎么分开?
- 如何让open-flash-chart不显示0值
channel.close()
connection.close(
config = config()
mq_server = config.getSignSection('mq_server')
#连接mq信息
host = mq_server['host']
user = mq_server['user']
port = int(mq_server['port'])
password = mq_server['password']
queue_name = mq_server['queue_name'] #监听mq
credentials = pika.PlainCredentials(user, password)
parameters = pika.ConnectionParameters(host,port,'/',credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel() #获取消息
channel.basic_consume(callback, queue_name, no_ack=True)
channel.start_consuming() channel.close()
connection.close()except Exception, e:
print e