More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Repair Queue Visibility Timeout Bugs

    1

    Diagnose and repair queue visibility timeouts, acknowledgement deadlines, long-running work, redelivery, and duplicate execution.

    $2.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Queue Visibility Timeout Bugs

    Repair Queue Visibility Timeout Bugs

    Example session with this skill installed

    Our SQS worker in Node.js keeps processing the same heavy image resize job twice. The job takes 45s but the queue visibility is 30s. Fix the worker to handle the extension.

    • Read your context and instructions
    • Compiled the repair queue visibility

    I have analyzed the worker logic. The duplicate execution occurs because the SQS visibility timeout expires before the image processing finishes, causing the message to reappear in the queue while the first worker is still active.

    SQS Visibility Heartbeat Implementation

    const { SQSClient, ChangeMessageVisibilityCommand } = require("@aws-sdk/client-sqs");
    
    async function processImageWithHeartbeat(message, context) {
      const sqs = new SQSClient({});
      const heartbeatInterval = 20000; // 20s (inside 30s window)
      
      const heartbeat = setInterval(async () => {
        try {
          await sqs.send(new ChangeMessageVisibilityCommand({
            QueueUrl: process.env.QUEUE_URL,
            ReceiptHandle: message.ReceiptHandle,
            VisibilityTimeout: 30
          }));
          console.log("Heartbeat: Visibility timeout extended.");
        } catch (err) {
          console.error("Heartbeat failed", err);
        }
      }, heartbeatInterval);
    
      try {
        // Existing image processing logic
        await resizeImage(message.Body);
      } finally {
        clearInterval(heartbeat);
      }
    }
    

    Next steps

    1. Update the VisibilityTimeout in your ChangeMessageVisibilityCommand to match your queue's default.
    2. Ensure the IAM role for the worker has the sqs:ChangeMessageVisibility permission.
    3. Deploy a test job with a 60-second sleep to verify the heartbeat extends the lease successfully.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repair Queue Visibility Timeout Bugs targets production and repository defects around diagnose and repair queue visibility timeouts, acknowledgement deadlines, long-running work, redelivery, and duplicate execution.. It examines visibility/ack deadline ownership, job duration versus timeout budget, heartbeat or lease extension, acknowledgement ordering, redelivery and duplicate execution, retry attempt identity, dead-letter transition timing, shutdown and observability, then establishes one explicit repair contract and focused deterministic validation.

    The skill works from repository access or partial evidence such as snippets, logs, configuration, traces, and architecture notes. It preserves existing product/security policy, avoids invented execution claims, and keeps production systems, real credentials, and deployment outside the validation path.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago
    Updated1 day ago

    What's inside

    Frequently Asked Questions