retrystorm · Learn · Interview practice · Glossary · Components

Home › Reference › Components › Message queue

Message queue

Stores each job and acknowledges at once; workers take the jobs later, and failed ones are retried.

Settings

Instance tier
Sizing label for this queue instance (small to xlarge). It is shown in the metrics; in the current simulation it does not change how fast the queue stores or hands out jobs.
Max waiting jobs
How many jobs may wait for a worker at once. When the line is full, new requests are refused right away and the sender sees a failure. Lower it to shed load early; raise it to absorb bigger bursts.
Jobs per request
How many jobs each accepted request turns into, for example one post becoming one job per follower. Higher values multiply the work the workers must do and grow the backlog faster.
Heavy writers (first N keys)
The first N keys are treated as heavy writers, like a celebrity account. Requests for these keys create 'Jobs per heavy-writer request' jobs instead of the normal number. 0 means none.
Jobs per heavy-writer request
How many jobs a request for a heavy-writer key creates. Set it far above 'Jobs per request' to see a few hot keys flood the workers while everyone else's jobs wait behind them.
Each copy writes its own key
When one request becomes several jobs, 'yes' makes each extra job write its own separate key (like one feed row per follower). 'no' makes every copy write the same key.
Combine writes to one key for (ms)
Writes to the same key arriving within this time of the first one are combined into a single job. Longer windows mean fewer jobs but each write waits longer. Cannot be combined with a fan-out.
Attempts per job
How many times a job may be handed to a worker before giving up. A job that runs out is dead-lettered (set aside), and if it carried a write, that acknowledged write is lost. Higher is safer but can add duplicate work.
First retry after (ms)
How long to wait before retrying a job whose worker reported a failure. Each later retry waits twice as long as the one before. Shorter retries recover faster but pile load onto a struggling worker.
Visibility timeout (ms)
How long the queue waits for a worker to answer before assuming it is stuck and handing the job out again. Too short and slow jobs run twice (duplicates); too long and a crashed worker's jobs sit idle. Default 30000.
Crashes
Scheduled outages for the queue. While it is down it refuses new requests, but jobs it already stored survive and are handed out again when it returns.
About · Contact · Privacy · Terms of use