Detailed explanation of Beanstalkd message/task queue

藏色散人
Release: 2023-04-06 13:04:02
forward
3324 people have browsed it

Detailed explanation of Beanstalkd message/task queue

What is Beanstalkd?

Beanstalkd is a high-performance, lightweight distributed memory queue system

Basic concept

job: requires asynchronous processing Task (or message) is the basic unit in Beanstalkd

tube: pipe (or message queue), used to store jobs of the same type, and is the object of producer and consumer operations

producer: The producer of the job puts a job into a tube through the put command

consumer: The consumer of the job uses the reserve/release/bury/delete command to obtain the job or change the status of the job

job status

delayed:Delayed status

ready:To be read by the consumer status

reserved:Consumer processing status

buried: reserved status

delete: processing completed deletion status

Features

priority: priority, supports 0 to 2^ The priority of 32, the smaller the value, the higher the priority. The default priority is 1024

delay: delay, delayed consumption, used to implement scheduled tasks

Persistence: use binlog to combine jobs and Its status is recorded in the file. After Beanstalkd restarts or hangs up, the previous job and status can be restored by reading the binlog.

TTR: Timeout control. When putting a job, you can set the timeout. If the consumer cannot After the processing is completed within the TTR time, the job will be set to the ready state for other consumers to continue execution.

The above is the detailed content of Detailed explanation of Beanstalkd message/task queue. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jmsite.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template