当前位置:   article > 正文

rabbitmq lazy-queues测试_rabbit中process memory

rabbit中process memory

文章来源:http://blog.csdn.net/qq_26656329/article/details/78832107

rabbitmq测试懒加载(延迟队列)

先创建个测试队列,往里面放100w条消息

import pika
credentials = pika.PlainCredentials(username='mq', password='654321')
connection = pika.BlockingConnection(
        pika.ConnectionParameters(
            host='localhost', port=5672, virtual_host='/',
            credentials=credentials
        )
    )
channel = connection.channel()

channel.exchange_declare(
    exchange='test',
    exchange_type='topic',
    durable=True,
)
channel.queue_declare(queue='test', durable=True)
channel.queue_bind(exchange='test', queue='test', routing_key='t')

for i in range(0, 1000000):
    channel.basic_publish(
        routing_key='t&#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/976538
推荐阅读
相关标签
  

闽ICP备14008679号