利用python脚本进行rabbitmq收发测试
发数据
import pika,time
user_pwd = pika.PlainCredentials('test', '123456') #用户名 密码
connectparam = pika.ConnectionParameters('rabbitmq_ip',5672,credentials=user_pwd)#IP,端口默认5672
connection = pika.BlockingConnection(connectparam)
channel = connection.channel() # 生成管道,在管道里跑不同的队列
#声明exchange
channel.exchange_declare(exchange = 'direct-test', durable = Tr