- Home
- Skills
- Agents & Orchestration
- Repair Queue Visibility Timeout Bugs
More screenshots
Works with the AI Agents you already use
Repair Queue Visibility Timeout Bugs
Diagnose and repair queue visibility timeouts, acknowledgement deadlines, long-running work, redelivery, and duplicate execution.
$1
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
- Update the
VisibilityTimeoutin yourChangeMessageVisibilityCommandto match your queue's default. - Ensure the IAM role for the worker has the
sqs:ChangeMessageVisibilitypermission. - 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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires logs, configuration, or code snippets to function. Cannot interact with live production cloud consoles or modify infrastructure-as-code files without repository access.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago