Package detail

bull-arena

bee-queue158.1kMIT4.5.1

An interactive UI dashboard for Bee Queue

bull-arena, bull, bee, bullmq

readme

Arena

NPM code style: prettier NPM downloads semantic-release

An intuitive Web GUI for Bee Queue, Bull and BullMQ. Built on Express so you can run Arena standalone, or mounted in another app as middleware.

For a quick introduction to the motivations for creating Arena, read Interactively monitoring Bull, a Redis-backed job queue for Node.

Screenshots

Features

  • Check the health of a queue and its jobs at a glance
  • Paginate and filter jobs by their state
  • View details and stacktraces of jobs with permalinks
  • Restart and retry jobs with one click

Usage

Arena accepts the following options:

const Arena = require('bull-arena');

// Mandatory import of queue library.
const Bee = require('bee-queue');

Arena({
  // All queue libraries used must be explicitly imported and included.
  Bee,

  // Provide a `Bull` option when using bull, similar to the `Bee` option above.

  queues: [
    {
      // Required for each queue definition.
      name: 'name_of_my_queue',

      // User-readable display name for the host. Required.
      hostId: 'Queue Server 1',

      // Queue type (Bull or Bee - default Bull).
      type: 'bee',

      // Queue key prefix. Defaults to "bq" for Bee and "bull" for Bull.
      prefix: 'foo',
    },
  ],

  // Optionally include your own stylesheet
  customCssPath: 'https://example.com/custom-arena-styles.css',

  // Optionally include your own script
  customJsPath: 'https://example.com/custom-arena-js.js',
});

The required name and hostId in each queue object have to be present in each queue object. Additional keys can be present in them, to configure the redis client itself.

The three ways in which you can configure the client are:

1. port/host

// In a queue object.
{
  // Hostname or IP. Required.
  "host": "127.0.0.1",

  // Bound port. Optional, default: 6379.
  "port": 6379,

  // Optional, to issue a redis AUTH command.
  "password": "hello",

  // Optional; default 0. Most of the time, you'll leave this absent.
  "db": 1
}

2. URL

You can also provide a url field instead of host, port, db and password.

{
  "url": "[redis:]//[[user][:password@]][host][:port][/db-number][?db=db-number[&password=bar[&option=value]]]"
}

3. Redis client options

Arena is compatible with both Bee and Bull. If you need to pass some specific configuration options directly to the redis client library your queue uses, you can also do so.

Bee uses node redis client, Bull uses ioredis client. These clients expect different configurations options.

{
  "redis": {}
}

For Bee, the redis key will be directly passed to redis.createClient, as explained here.

For Bull, the redis key will be directly passed to ioredis, as explained here. To use this to connect to a Sentinel cluster, see here.

Custom configuration file

To specify a custom configuration file location, see Running Arena as a node module.

Note that if you happen to use Amazon Web Services' ElastiCache as your Redis host, check out http://mixmax.com/blog/bull-queue-aws-autodiscovery

Running Arena as a node module

See the Docker image section or the docker-arena repository for information about running this standalone.

Note that because Arena is implemented using async/await, Arena only currently supports Node >=7.6.

Using Arena as a node module has potential benefits:

  • Arena can be configured to use any method of server/queue configuration desired
    • for example, fetching available redis queues from an AWS instance on server start
    • or even just plain old reading from environment variables
  • Arena can be mounted in other express apps as middleware

Usage:

In project folder:

$ npm install bull-arena

In router.js:

const Arena = require('bull-arena');

const express = require('express');
const router = express.Router();

const arena = Arena({
  // Include a reference to the bee-queue or bull libraries, depending on the library being used.

  queues: [
    {
      // First queue configuration
    },
    {
      // Second queue configuration
    },
    {
      // And so on...
    },
  ],
});

router.use('/', arena);

Arena takes two arguments. The first, config, is a plain object containing the queue configuration, flow configuration (just for bullmq for now) and other optional parameters. The second, listenOpts, is an object that can contain the following optional parameters:

  • port - specify custom port to listen on (default: 4567)
  • host - specify custom ip to listen on (default: '0.0.0.0')
  • basePath - specify custom path to mount server on (default: '/')
  • disableListen - don't let the server listen (useful when mounting Arena as a sub-app of another Express app) (default: false)
  • useCdn - set false to use the bundled js and css files (default: true)
  • customCssPath - an URL to an external stylesheet (default: null)
Example config (for bull)
import Arena from 'bull-arena';
import Bull from 'bull';

const arenaConfig = Arena({
  Bull,
  queues: [
    {
      type: 'bull',

      // Name of the bull queue, this name must match up exactly with what you've defined in bull.
      name: "Notification_Emailer",

      // Hostname or queue prefix, you can put whatever you want.
      hostId: "MyAwesomeQueues",

      // Redis auth.
      redis: {
        port: /* Your redis port */,
        host: /* Your redis host domain*/,
        password: /* Your redis password */,
      },
    },
  ],

  // Optionally include your own stylesheet
  customCssPath: 'https://example.com/custom-arena-styles.css',

  // Optionally include your own script
  customJsPath: 'https://example.com/custom-arena-js.js',
},
{
  // Make the arena dashboard become available at {my-site.com}/arena.
  basePath: '/arena',

  // Let express handle the listening.
  disableListen: true,
});

// Make arena's resources (js/css deps) available at the base app route
app.use('/', arenaConfig);

(Credit to tim-soft for the example config.)

Example config (for bullmq)
import Arena from 'bull-arena';
import { Queue, FlowProducer } from "bullmq";

const arenaConfig = Arena({
  BullMQ: Queue,
  FlowBullMQ: FlowProducer,
  queues: [
    {
      type: 'bullmq',

      // Name of the bullmq queue, this name must match up exactly with what you've defined in bullmq.
      name: "testQueue",

      // Hostname or queue prefix, you can put whatever you want.
      hostId: "worker",

      // Redis auth.
      redis: {
        port: /* Your redis port */,
        host: /* Your redis host domain*/,
        password: /* Your redis password */,
      },
    },
  ],

  flows: [
    {
      type: 'bullmq',

      // Name of the bullmq flow connection, this name helps to identify different connections.
      name: "testConnection",

      // Hostname, you can put whatever you want.
      hostId: "Flow",

      // Redis auth.
      redis: {
        port: /* Your redis port */,
        host: /* Your redis host domain*/,
        password: /* Your redis password */,
      },
    },
  ],

  // Optionally include your own stylesheet
  customCssPath: 'https://example.com/custom-arena-styles.css',

  // Optionally include your own script
  customJsPath: 'https://example.com/custom-arena-js.js',
},
{
  // Make the arena dashboard become available at {my-site.com}/arena.
  basePath: '/arena',

  // Let express handle the listening.
  disableListen: true,
});

// Make arena's resources (js/css deps) available at the base app route
app.use('/', arenaConfig);

Bee Queue support

Arena is dual-compatible with Bull 3.x and Bee-Queue 1.x. To add a Bee queue to the Arena dashboard, include the type: 'bee' property with an individual queue's configuration object.

BullMQ Queue support

Arena has added preliminary support for BullMQ post 3.4.x version. To add a BullMQ queue to the Arena dashboard, include the type: 'bullmq' property with an individual queue's configuration object.

Docker image

You can docker pull Arena from Docker Hub.

Please see the docker-arena repository for details.

Official UIs

Contributing

See contributing guidelines and an example.

License

The MIT License.

changelog

4.5.1 (2025-04-28)

Bug Fixes

  • get-flow: consider when there are not children (#683) (baa676a)

4.5.0 (2025-04-25)

Features

4.4.2 (2024-06-13)

Bug Fixes

4.4.1 (2024-05-07)

Bug Fixes

  • jobs: validate jobs length in bulk action (#676) (2bce363)

4.4.0 (2024-05-03)

Features

  • bull: add clean jobs button for completed and failed (#675) (e62aef0)

4.3.0 (2024-04-27)

Features

4.2.0 (2024-02-12)

Features

  • add-job: provide editor for adding options (#670) (3f4c640)

4.1.1 (2024-02-08)

Bug Fixes

  • layouts: include favicon at layout template (#668) (a107ad9)

4.1.0 (2023-10-28)

Features

  • bullmq: support removing repeatable jobs (#667) (df1ab37)

4.0.1 (2023-09-11)

Bug Fixes

  • job-details: omit scripts attribute to stringify jobs (#665) fixes #598 (a76ed5f)

4.0.0 (2023-09-02)

⚠ BREAKING CHANGES

  • bullmq: add new prioritized state, previous versions of bullmq wont't see this state

Features

3.30.4 (2023-02-18)

Bug Fixes

  • mounting: differentiate base and appBase paths when disableListen (#623) (387e3ac)

3.30.3 (2023-01-06)

Bug Fixes

3.30.2 (2022-12-04)

Bug Fixes

  • qs: security patches on body-parser and express dependencies (#593) (6c5871f)

3.30.1 (2022-11-07)

Bug Fixes

  • remove-repeatable: consider old versions of bull (#580) (f406750)

3.30.0 (2022-10-18)

Features

  • bull: support removing repeatable jobs (#574) (29528cf)

3.29.5 (2022-08-11)

Bug Fixes

  • deps: bump minimist from 1.2.5 to 1.2.6 (#507) (229cfe3)

3.29.4 (2022-08-11)

Bug Fixes

  • deps: bump moment from 2.29.1 to 2.29.4 (#540) (81f13a8)

3.29.3 (2021-09-08)

Bug Fixes

3.29.2 (2021-08-12)

Bug Fixes

  • Revert bootstrap upgrade in 3.24.0 (PR)

3.29.1 (2021-07-06)

Bug Fixes

  • job-details: encodeURI of job ID for URL (0b60010), closes #416

3.29.0 (2021-06-14)

Features

  • tree-view: use perma links on nodes (07b6f3d)

3.28.0 (2021-06-11)

Features

  • flow: add search button to get a flow tree (59b0423)
  • layout: add treeview (d3fa754)
  • tree-view: add tree view when creating a flow (eb93a60)

3.27.0 (2021-06-11)

Features

  • job-details: add pagination options in getDependencies (40e177f)

3.26.0 (2021-06-10)

Features

  • job-details: add children counters (71bbb9d)

3.25.0 (2021-06-10)

Features

  • parent-children: implement perma-link for bullmq (bbd2317)
  • initial changes for displaying parentJob and childrenJobs in JobDetails template - WIP (61d93e2)

3.24.1 (2021-06-08)

Bug Fixes

  • job-details: show progress for bullmq (8341174)

3.24.0 (2021-06-07)

Features

  • bootstrap: upgrade to v4.6.0 (c8d24c5)

3.23.0 (2021-06-02)

Features

  • bullmq: provide support for flow creation (da783af)
  • flow-details: add redis statistics (e2b20f3)

3.22.0 (2021-05-25)

Features

  • bull: adding pause queue button (019f7f5)

Bug Fixes

  • bull: consider paused state (3651d52)
  • deps: upgrading handlebars to 4.7.7 (5a62529)

3.21.0 (2021-05-20)

Features

  • bullmq: support waiting-children state (8832821)

3.20.1 (2021-04-15)

Bug Fixes

  • jsoneditor: adding map file (f374f98)

3.20.0 (2021-04-13)

Features

  • promote: adding Promote Jobs button (c0e0d59)

Bug Fixes

  • lintstage: applying eslint only to js to avoid conflicts with changelog (4914b10)

3.19.0 (2021-04-05)

Features

  • bull: add button to promote delayed job (73031dd)

Bug Fixes

3.18.0 (2021-04-05)

Features

  • customjspath: customize layout by custom script (b5e3651)

Bug Fixes

3.17.1 (2021-04-05)

Bug Fixes

  • fixes misplaced parameters (4b98628)

3.17.0 (2021-03-31)

Features

Bug Fixes

  • wrong "execute at" date (3d0a4d1)

3.16.0 (2021-03-31)

Features

  • add optional custom css (3f68dc1)

3.15.0 (2021-03-12)

Features

  • bull: adding log message in bull example (eb12399)

Bug Fixes

  • queuejobsbystate: bring logs only in job page (8ebd5c0)

3.14.0 (2021-03-10)

Features

  • jobdetails: adding executes at detail (2e88919)
  • jobdetails: support executes at for bee queue (03b4932)

3.13.0 (2021-03-08)

Features

  • jobdetails: showing processed on and finished on (48ca96a)

Bug Fixes

  • capitalize: using passed value to be capitalized (2d98fee)

3.12.0 (2021-03-08)

Features

  • better example showing jobs move through states (7c0bc7c)

3.11.0 (2021-03-07)

Features

  • bull: adding example for failed and completed jobs (8e1fdbc)

Bug Fixes

  • bulkaction: handling retry logic in bulk (d396dac)
  • bulkaction: use queuestate to differentiate logic (62f72cf)
  • deps: delete jsoneditor dependency (17bc341)

3.10.0 (2021-03-02)

Features

  • bull: adding bull in example (da1ad97)
  • queuejobsbystate: retry bulk delayed jobs (d3eb2bf)

Bug Fixes

  • bee-queue: disable retry jobs button for bee-queue (57dc1d6)

3.9.0 (2021-02-25)

Features

  • add contributing guidelines and working example (8616383)

3.8.0 (2021-02-22)

Features

  • queuejobsbystate: adding order dropdown (c5d21a0)

Bug Fixes

  • queuejobsbystate: apply descending ordering for jobs when using bull queue (1e1f891)

3.7.1 (2021-02-18)

Bug Fixes

  • dashboard: change shouldHide condition (5722b55)
  • dashboard: refresh page when adding a new job (0fa5d02)

3.7.0 (2020-12-16)

Features

  • deps: remove dependency on handlebars-helpers (#302) (bbacae8)

3.6.1 (2020-11-26)

Bug Fixes

  • support redis configuration with bullmq (#294) (ab4b806)

3.6.0 (2020-11-25)

Features

3.5.0 (2020-11-21)

Features

  • job-details: support arenaName display field (332fb3a)

3.4.0 (2020-11-01)

Features

3.3.3 (2020-10-29)

Bug Fixes

  • job-details: actually correctly wait for promises (#271) (6e205a6)

3.3.2 (2020-10-29)

Bug Fixes

  • job-details: correctly wait for promises (#254) (934e92a)

3.3.1 (2020-10-28)

Bug Fixes

3.3.0 (2020-10-28)

Features

  • job-details: show stacktraces when job is delayed or done (#238) (6b3dd6f)

3.2.4 (2020-10-28)

Bug Fixes

3.2.3 (2020-10-17)

Bug Fixes

3.2.2 (2020-08-06)

Bug Fixes

3.2.2 (2020-08-06)

Bug Fixes

3.2.1 (2020-08-05)

Bug Fixes

  • queue-view: improve handling of falsy job.id values (9415643), closes #181

3.2.0 (2020-08-05)

Features

3.1.0 (2020-08-05)

Features

  • add-job: add jsoneditor code and text modes (#217) (63ca0c8)
  • job-details: show raw progress when not numeric (bd0d697)

3.0.2 (2020-08-05)

Bug Fixes

  • use normal require path for defaultConfig (#196) (533f702)

3.0.1 (2020-08-05)

Bug Fixes

  • improve error message for no queues (b8f2afc)

3.0.0 (2020-08-05)

⚠ BREAKING CHANGES

  • all users must now pass in the queue constructor(s) for the configuration.

Features

  • remove direct application execution support (95ecf42)
  • remove explicit queue dependencies (ba190a4)

Release History

  • 2.8.2

    • [Fix] Move nodemon to dev dependencies and update (#184) - thanks @Jimmysh!
    • [Fix] Encode url for the action 'add job' (#194) - thanks @pluschnikow!
    • [Fix] Fix job retry (#223) - thanks @roychri!
  • 2.8.1 Fix bull queue job publishing

  • 2.8.0 Add ability to run jobs on demand (#211) - thanks @bvallelunga!

  • 2.7.1 Fix add job functionality (#197) - thanks @bogdan!

  • 2.7.0 Job logs show up for bull queue jobs (#201) - thanks @ganeshcse2991!

  • 2.6.4 Fix circular dependency issue when viewing failed jobs (#183) - thanks @ghmeier!

  • 2.6.3 Pull in handlebars security advisory patch (#168) - thanks @pklingem!

  • 2.6.2 Fix "add job" vendor/API path when basePath is set (#157) - thanks, @jacobpgn

  • 2.6.1 Hot patch: commit /vendor assets to fix new UI.

  • 2.6.0 Add the ability to add jobs via Arena (#55/#153) - thanks, @krazyjakee!

  • 2.5.4 Upgrade handlerbars-helpers to fix flagged vulnerability (#151) - thanks, @eeVoskos!

  • 2.5.3 Fix navbar reference (#146) - thanks @anurag-rai!

  • 2.5.2 Support custom job IDs in arena (#126) - thanks @gcox!

  • 2.5.1 Upgrade nodemon to avoid the vulnerable event-stream (#136)

  • 2.5.0 Support redis over TLS. (#122) - thanks @timcosta!

  • 2.4.5 Allow the package to be once again installed using Yarn (#99)

  • 2.4.4 deyarn

  • 2.4.3 Fix progress indicator for Bill 3.x https://github.com/bee-queue/arena/pull/96

  • 2.4.2 Fix XSS issue https://github.com/bee-queue/arena/pull/84 (thanks @ohwillie)

  • 2.4.1 Fix regression where 'url' parameter wasn't respected (#85 - @ohwillie)

  • 2.4.0 Custom Redis configurations and documentation improvements (#81 - @vhf)

  • 2.3.1 UI improvement: add syntax highlighting to JSON - thanks @emhagman!

  • 2.3.0 Upgraded Bull to v3.3.7

  • 2.2.2 Include name in description per #74.

  • 2.2.1 Fixed links in interface

  • 2.2.0 Added uri coneection parameter.

  • 2.1.3 Fixed issue where progress bar didn't work in Bull in Bull

  • 2.1.2 Fixed issue where paging wasn't working in Bull

  • 2.0.0 Added support for Bee Queue

  • 1.0.0 Initial release