Command Palette

Search for a command to run...

Upstash/Upstash Queue Card

Upstash Queue Card

QStash message/task status card showing state, retries, scheduled time, and payload preview.

Open in v0Open in
Processing
msg_abc1...
{"userId": "user_123", "action": "send_email"}
Jan 27, 05:38 AM
1/3 retries
Completed
msg_xyz7...
{"report": "daily_analytics"}
Jan 27, 04:38 AM
Jan 27, 05:38 AM
Failed
msg_fail...
{"webhook": "https://api.example.com"}
3/3 retries
Connection timeout after 30s

Overview

Display QStash task status with visual badges for pending/processing/completed/failed/scheduled states. Shows retry count, scheduled time, payload preview, and error messages.

Installation

npx shadcn@latest add @elements/upstash-queue-card

Usage

import { UpstashQueueCard } from "@/components/elements/upstash/upstash-queue-card";

export function TaskStatus({ task }) {
  return (
    <UpstashQueueCard
      id={task.messageId}
      status="processing"
      payload={JSON.stringify(task.body)}
      scheduledAt={task.notBefore}
      retries={task.retried}
      maxRetries={3}
    />
  );
}

Props

PropTypeDefaultDescription
idstring-Message/task ID
status"pending" | "processing" | "completed" | "failed" | "scheduled"-Task status
payloadstring-Payload preview
scheduledAtDate | string-Scheduled execution time
completedAtDate | string-Completion time
retriesnumber0Current retry count
maxRetriesnumber3Maximum retries
errorstring-Error message (for failed status)
classNamestring-Additional CSS classes

Features

  • Color-coded status badges
  • Payload preview with truncation
  • Retry counter display
  • Scheduled/completed time formatting
  • Error message display for failed tasks