For AI agents: the complete documentation index is available at /bull-board/llms.txt, the full documentation bundle is available at /bull-board/llms-full.txt, and this page is available as Markdown at /bull-board/queue-adapters/bull.md.

BullAdapter

For the Bull queue library.

Import

import { BullAdapter } from '@bull-board/api/bullAdapter';
// or
const { BullAdapter } = require('@bull-board/api/bullAdapter');

Usage

import { createBullBoard } from '@bull-board/api';
import { BullAdapter } from '@bull-board/api/bullAdapter';
import { ExpressAdapter } from '@bull-board/express';
import Queue from 'bull';

const myQueue = new Queue('my-queue', {
  redis: { host: 'localhost', port: 6379 },
});

const serverAdapter = new ExpressAdapter();
serverAdapter.setBasePath('/admin/queues');

createBullBoard({
  queues: [new BullAdapter(myQueue)],
  serverAdapter,
});

Options

All options are optional.

OptionTypeDefaultDescription
readOnlyModebooleanfalseHides all queue and job actions.
allowRetriesbooleantrueShows or hides the retry buttons on failed jobs. Forced to false when readOnlyMode is true.
descriptionstring''Queue description text displayed in the UI.
displayNamestring''Overrides the queue name shown in the UI.
prefixstring''Prepended to job names in the UI.
delimiterstring''Delimiter between the prefix and the job name.
externalJobUrl(job) => { href, displayText? }noneLinks each job card to a page in your own app. See External job URLs.
jobDataSchemaobject (JSON Schema)noneDescribes the shape of a job's data, driving the Add job form's prefill, autocomplete and inline validation. See Job data schema.
Tip

allowCompletedRetries (available on BullMQAdapter) has no effect here. Bull can't retry completed jobs, so it's always off.

Instance methods

adapter.setFormatter('name', (job) => `#${job.name}`);
adapter.setFormatter('data', (data) => redact(data));
adapter.setFormatter('returnValue', (value) => redact(value));
adapter.setFormatter('progress', (progress) => `${Math.round(progress)}%`);

adapter.setVisibilityGuard((request) => {
  // return true to show this queue, false to hide it
  return request.headers['x-tenant-id'] === 'acme';
});