Skip to content

优先级队列 ​

python
channel.queue_declare(
    queue='priority_queue',
    arguments={'x-max-priority': 10}
)

channel.basic_publish(
    exchange='',
    routing_key='priority_queue',
    body='message',
    properties=pika.BasicProperties(priority=5)
)

用心记录每一步成长