多个sidekiq实例可以处理同一个队列吗 [英] Can multiple sidekiq instances process the same queue

查看:47
本文介绍了多个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实例可以处理同一个队列吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆