Getting Started

Configuration

Configure the Queuedash SDK for your workflow.

Most teams keep the defaults; adjust batching and retries only when you need finer control.

Minimal setup

import { Queuedash } from "@queuedash/sdk";
 
const qd = new Queuedash({
  apiKey: process.env.QUEUEDASH_API_KEY,
});

Common options

const qd = new Queuedash({
  apiKey: process.env.QUEUEDASH_API_KEY,
  batchSize: 100, // default 50
  flushInterval: 200, // default 100ms
  maxRetries: 3, // default 5
  requestTimeout: 20000, // default 30000
  onError: (error) => {
    // Send to your error tracking
    Sentry.captureException(error);
  },
});
OptionDefaultNotes
apiKey-Required.
baseUrlhttps://api.queuedash.comOverride for self-hosted.
batchSize50Jobs per batch; increase for high throughput.
flushInterval100msSend cadence; reduce for lower latency.
maxRetries5Retry attempts before dropping.
requestTimeout30000msHTTP timeout.
maxQueueSize10000Local buffer before dropping oldest.
onError-Hook into logging/alerting.

Batching & resilience

  • Batches flush when hitting batchSize or flushInterval, whichever comes first.
  • Circuit breaker pauses syncing after consecutive failures and resumes automatically.

Shutdown

The SDK traps SIGTERM/SIGINT and flushes buffers. You can also stop explicitly:

await qd.stop();