@lastshotlabs/slingshot-bullmq
npm install @lastshotlabs/slingshot-bullmq
Functions
Section titled “Functions”bullmqAdapterOptionsSchema
Section titled “bullmqAdapterOptionsSchema”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
Config Fields
Section titled “Config Fields”| Field | Description |
|---|---|
| `/** |
- BullMQ/ioredis connection options. Must be a plain object (not a URL string).
hostmust be a string andportmust be a number when provided. / connection| BullMQ/ioredis connection options; must be a plain object (not a URL string) | |/* Event payload validation mode. Default| Event payload validation mode (default: "off") | |/** Queue name prefix. Default` | Queue name prefix (default: “slingshot:events”) |
Source: packages/slingshot-bullmq/src/bullmqAdapter.ts
createBullMQAdapter
Section titled “createBullMQAdapter”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
function createBullMQAdapter(rawOpts: BullMQAdapterOptions & EventBusSerializationOptions & { onDrop?: (event: string, reason: BullMQAdapterDropReason) => void; /** * Optional structured logger (see `Logger` from * `@lastshotlabs/slingshot-core`). Defaults to a console-backed JSON * logger when omitted. All warn/error paths in the adapter route * through this logger with structured context fields. */ logger?: Logger; /** * Optional metrics sink. When provided, the adapter records publish / * consume / dlq counters, publish/consume durations, and pending-buffer * + worker-paused gauges so operators can wire ad-hoc dashboards * without log scraping. Defaults to a no-op emitter. */ metrics?: MetricsEmitter; },): SlingshotEventBus &Source: packages/slingshot-bullmq/src/bullmqAdapter.ts
Classes
Section titled “Classes”BullMQAdapterError
Section titled “BullMQAdapterError”Errors thrown by the BullMQ event bus adapter.
Source: packages/slingshot-bullmq/src/errors.ts
DuplicateDurableSubscriptionError
Section titled “DuplicateDurableSubscriptionError”Errors thrown by the BullMQ event bus adapter.
Source: packages/slingshot-bullmq/src/errors.ts
DurableSubscriptionNameRequiredError
Section titled “DurableSubscriptionNameRequiredError”Errors thrown by the BullMQ event bus adapter.
Source: packages/slingshot-bullmq/src/errors.ts
DurableSubscriptionOffError
Section titled “DurableSubscriptionOffError”Errors thrown by the BullMQ event bus adapter.
Source: packages/slingshot-bullmq/src/errors.ts
Interfaces
Section titled “Interfaces”BullMQAdapterDropEvent
Section titled “BullMQAdapterDropEvent”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
Source: packages/slingshot-bullmq/src/bullmqAdapter.ts
BullMQAdapterHealth
Section titled “BullMQAdapterHealth”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
Source: packages/slingshot-bullmq/src/bullmqAdapter.ts
BullMQAdapterDropReason
Section titled “BullMQAdapterDropReason”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
Source: packages/slingshot-bullmq/src/bullmqAdapter.ts
BullMQAdapterOptions
Section titled “BullMQAdapterOptions”Zod schema for BullMQAdapterOptions. Validated at adapter-creation time.
Remarks: The connection.port field must be a number, not a string. Passing a string (e.g. from an environment variable) will fail validation with a clear message.
Source: packages/slingshot-bullmq/src/bullmqAdapter.ts