多个sidekiq实例可以处理同一个队列吗

编程入门 行业动态 更新时间:2024-10-23 05:40:07
本文介绍了多个sidekiq实例可以处理同一个队列吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不熟悉 Sidekiq 的内部结构,想知道是否可以使用相同的配置启动多个 Sidekiq 实例(处理相同的队列).

I'm not familiar with the internals of Sidekiq and am wondering if it's okay to launch several Sidekiq instances with the same configuration (processing the same queues).

是否有可能 2 个或更多 Sidekiq 实例会处理来自队列的相同消息?

Is it possible that 2 or more Sidekiq instances will process the same message from a queue?

更新:在超过 1 台机器上运行 Sidekiq 时,我需要知道是否可能存在冲突

UPDATE: I need to know if there is a possible conflict, when running Sidekiq on more than 1 machine

推荐答案

是的,sidekiq 绝对可以针对同一个队列运行多个进程.Redis 只会将消息传递给一个随机进程.

Yes, sidekiq can absolutely run many processes against the same queue. Redis will just give the message to a random process.

更多推荐

多个sidekiq实例可以处理同一个队列吗

本文发布于:2023-10-30 04:10:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541723.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   队列   实例   sidekiq

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!