简体   繁体   中英

Sidekiq queues, how to prevent jobs from being rejected?

I'm using Sidekiq, and my sidekiq.yml configuration looks like this:

:concurrency: 2 :queues: - [default, 5] - [paperclip, 5] - [activity_log, 5] - [sms, 100] - [search, 5]

Now, the sms queue is for sending texts. What happens if 500 texts get sent at once (asynchronously), if the queue gets full after the first 100 hit it, will it reject the other 400? Or does Sidekiq have a "waiting" queue or something too. Confused about how I should handle this and prevent any jobs from being rejected.

According to the documentation on https://github.com/mperham/sidekiq/wiki/Advanced-Options , the number you put after the queue name is the weight of how often that queue will be checked. So in your example you are saying to check the sms queue 100 times more often than normal.
I believe it has nothing to do with how many jobs are queued.

Also in the link from the documentation, there is information about job retying.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM