How to Monitor Beanstalkd Queue In Laravel Using Admin Console

This laravel tutorial help to integrate beanstalkd console admin ui with laravel application. I will use Beanstalkd Admin UI plugin to implement beanstalk console view into bootstrap template.

You can see you working queue process into admin ui using http:///beanstalkd/tubes in your browser.You can get more statistics about beanstalkd like how many jobs process,ready jobs, delayed jobs etc.The per-requisite are the laravel 5.2 framework, I assumes you have a copy of Laravel downloaded if not please create new one using composer or installer.

Laravel Queue is very awesome features, The Laravel Queues allow you to defer the processing of a time consuming task.The Queue process has following steps to run task.

Why do we need Queue

We have many tasks into high-volume web applications, that are time consuming process, We can move that task into beanstalkd queue and redirect user to the next view, This help to run time-consuming tasks asynchronously using beanstalkd and process into background using supervisord.

You can also check other recommended tutorials of Lumen/Laravel,

Admin UI for Beanstalkd with in Laravel

Dionera has been created wonderful UI, that have all statistics which are necessary to view in order to monitor queue.This tutorial focusing on getting admin console of laravel queue using beanstalkd.

Step 1: We will install laravel-beanstalkd-ui using composer, Please make sure you are in root of laravel application.
composer require dionera/laravel-beanstalkd-ui

Step 2: We will publish the package’s assets into laravel.
php artisan vendor:publish --provider="Dionera\BeanstalkdUI\BeanstalkdUIServiceProvider" --tag="public"

Above command will publish all the required JavaScript and CSS into laravel applications public/vendor/beanstalkdui folder.

Step 3: We will register class into config/app.php file under providers array.
Dionera\BeanstalkdUI\BeanstalkdUIServiceProvider::class,

Now open http:///beanstalkd/tubes into your browser, You can see beanstalk UI and stats.You need to validate login credential since its using basic auth, You can override configuration using your file,

php artisan vendor:publish --provider="Dionera\BeanstalkdUI\BeanstalkdUIServiceProvider" --tag="config"

Above command will create beanstalkdui.php file in your application’s config/ folder.

beanstalkd-admin-console-ui

The Configs Parameters are:

Value Default Description
host '127.0.0.1' The Beanstalkd host.
port 11300 The Port Beanstalkd is running on.
middleware ['web', 'auth'] An array of middlewares which get applied to all the package’s routes. If no middleware should be applied simply remove auth from the array.
prefix Route prefix that should be applied the Admin UI routes.
failed_jobs true Defines if you want to be able to also manage your failed jobs through the UI. If set to true an additional table containing all failed jobs for the current tube will be displayed.
failed_jobs_table failed_jobs The name of the table containing your failed jobs.

Leave a Reply

Your email address will not be published. Required fields are marked *