usage.txt 431 B

12345678910
  1. # 先启动消费者:
  2. python consumer_priority.py
  3. # 再启动生产者,按不同优先级丢消息: (在测试中, 这样发送是不行的, 因为消息没有积压, 数据量不够, 但是是正常现象, 在正常生产环境中, 这个是对的)
  4. python producer_priority.py 1 "low"
  5. python producer_priority.py 9 "urgent"
  6. python producer_priority.py 5 "medium"
  7. # 为了测试, 使用批量发送
  8. python batch_priority.py