我想知道是否可以设置队列中的最大消息数?
假设我希望队列 Foo 中的消息不超过 100 条,可以吗?
最佳答案
对的,这是可能的。
来自 official documentation
The maximum length of a queue can be limited to a set number of messages by supplying the x-max-length queue declaration argument with a non-negative integer value.
AFAIK,鼠兔
channel.queue_declare
有 queue_declare 有 arguments
论证这绝对是你想要的。
关于python - 设置队列中的最大消息数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17655559/