Kafka Dlq Review 标志

Kafka Dlq Review

组织
lensesio
kafka-dlq-review

使用 Lenses MCP 服务器检查死信队列实现是否完整。检查 DLQ 主题是否存在、配置、监控、元数据保留、重试逻辑、重新处理路径,以及连接器 DLQ 配置是否一致。当用户说“检查死信队列”“检查 DLQ 设置”“审计 DLQ”,或询问错误处理、消息失败或重新处理时使用。请勿用于重新处理 DLQ 消息或管理消费者偏移量。

Add to TypingMind

概览

发布者lensesio
代码仓库agentic-engineering-for-apache-kafka
技能名称kafka-dlq-review
星标数
67
复刻数
19
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 lensesio 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Kafka Dlq Review AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-dlq-review
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lensesio/agentic-engineering-for-apache-kafka.git /tmp/agentic-engineering-for-apache-kafka
mkdir -p .claude/skills
cp -r /tmp/agentic-engineering-for-apache-kafka/skills/kafka-dlq-review .claude/skills/kafka-dlq-review
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Kafka Dlq Review,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Kafka Dlq Review。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Kafka Dlq Review 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Kafka Dead Letter Queue Review

Reviews dead letter queue implementations for completeness and best practices. DLQs are a cross-cutting concern that every Kafka consumer eventually needs. Most teams implement them as an afterthought and forget to monitor them.

Target environment: $ARGUMENTS

Workflow

Copy this checklist and track your progress:

DLQ Review Progress:
- [ ] Step 1: Discover DLQ topics
- [ ] Step 2: Check DLQ topic configuration
- [ ] Step 3: Verify DLQ monitoring
- [ ] Step 4: Sample DLQ messages
- [ ] Step 5: Audit connector DLQ configs
- [ ] Step 6: Scan codebase for error handling
- [ ] Step 7: Generate report with maturity assessment
  1. Discover DLQ topics in the cluster
  2. Check DLQ topic configuration (retention, partitions)
  3. Verify DLQ monitoring (consumers, alerting)
  4. Sample DLQ messages for metadata completeness
  5. Audit connector DLQ configs
  6. Scan codebase for error handling patterns
  7. Report findings with maturity assessment

Step 1: Discover DLQ Topics

Use the Lenses MCP list_topics tool and filter for DLQ topics by naming convention:

  • *.dlq
  • *.dead-letter
  • *.error
  • *.errors
  • *.retry
  • *-dlq
  • *-dead-letter

Also check connector configurations for DLQ topic names using list_kafka_connectors.

Expected output: List of DLQ topics discovered by naming convention and connector config.

Validation: If no DLQ topics are found, search the codebase for error topic configuration before concluding that DLQs are not implemented.

Step 2: Check DLQ Topic Configuration

For each discovered DLQ topic, use get_topic to verify:

  • Warning: Retention too short (DLQ messages should be kept longer than source topics for investigation)
  • Warning: Only 1 partition (may bottleneck if DLQ volume spikes)
  • Warning: Replication factor < source topic (DLQ data is often more critical to preserve)
  • Suggestion: Consider compaction for DLQ topics where reprocessing overwrites errors

Step 3: Verify DLQ Monitoring

Use list_consumer_groups_by_topic for each DLQ topic to check:

  • Critical: DLQ topic has no consumer groups (nobody is monitoring failures)
  • Warning: DLQ consumer groups are inactive/empty (monitoring may have stopped)
  • Suggestion: DLQ consumer groups should include alerting or dashboarding services

Check DLQ message rates using get_dataset_message_metrics:

  • Warning: Sustained high DLQ message rate (indicates upstream problem)
  • Warning: DLQ message rate increasing over time (degrading system health)

Step 4: Sample DLQ Messages

Use the Lenses MCP execute_sql tool to sample messages from DLQ topics:

sql
SELECT * FROM `{dlq-topic}` LIMIT 10

Check that DLQ messages include complete metadata:

Required Metadata

  • Critical: Original topic name (where the message came from)
  • Critical: Error message (what went wrong)
  • Warning: Original partition and offset (for tracing)
  • Warning: Original timestamp (when it was produced)
  • Suggestion: Stack trace (for debugging)
  • Suggestion: Retry count (how many times it was attempted)
  • Suggestion: Consumer group ID (which consumer failed)

Step 5: Audit Connector DLQ Configs

Use list_kafka_connectors and get_kafka_connector_target_definition to check:

  • Critical: Connectors with errors.tolerance=all but no errors.deadletterqueue.topic.name (silently drops messages)
  • Warning: Connectors with errors.tolerance=none and no DLQ (stops on any error, no recovery path)
  • Suggestion: Enable errors.deadletterqueue.context.headers.enable=true for richer error context
  • Suggestion: Enable errors.log.enable=true for error logging

Step 6: Codebase Inspection

Search the codebase for error handling and DLQ patterns:

  • DLQ producer setup (search for dlq, dead.letter, error.topic)
  • Retry logic before DLQ routing (search for retry, backoff, max_retries)
  • Error handling in consumers (search for exception handling around poll, consume, process)
  • Reprocessing mechanisms (scripts or tools to replay DLQ messages)

Flag:

  • Warning: Consumers with no error handling around message processing
  • Warning: Immediate DLQ routing without retry attempts
  • Suggestion: No reprocessing mechanism for DLQ messages (use resend_message via Lenses or custom tooling)

Success Criteria

Quantitative

  • Triggers on 90% of DLQ-related queries (test with 10-20 varied phrasings)
  • Completes review in under 15 tool calls (MCP + codebase search)
  • Discovers 100% of DLQ topics matching standard naming patterns

Qualitative

  • Unmonitored DLQ topics are always flagged as critical
  • Metadata completeness is assessed per DLQ topic with a clear checklist
  • Maturity assessment (none/basic/complete) is consistently applied

Examples

Example 1: Full DLQ audit

User says: "Audit all dead letter queues in production"

Actions:

  1. Discover all DLQ topics by naming convention
  2. Check each DLQ topic's configuration and monitoring
  3. Sample messages for metadata completeness
  4. Audit connector DLQ configs
  5. Scan codebase for error handling patterns Result: Comprehensive DLQ maturity report across all consumers and connectors

Example 2: Investigating message failures

User says: "Messages are ending up in the DLQ, what's going wrong?"

Actions:

  1. Sample recent DLQ messages with execute_sql
  2. Check error messages and stack traces
  3. Trace back to the source topic and consumer group
  4. Check DLQ message rate trends Result: Root cause analysis of DLQ message flow

Example 3: DLQ coverage check

User says: "Do all our consumers have DLQ handling?"

Actions:

  1. List all consumer groups from Lenses
  2. Check which groups have corresponding DLQ topics
  3. Scan codebase for error handling in consumers
  4. Report consumers missing DLQ implementation Result: Coverage report showing DLQ maturity per consumer

Troubleshooting

No DLQ topics found

Cause: DLQ topics may use non-standard naming or DLQs may not be implemented yet. Solution: Search the codebase for error topic configuration. Also check connector configs for DLQ topic names that may not follow common patterns.

DLQ messages have no metadata

Cause: The DLQ producer does not include headers or structured error information. Solution: Report this as a critical finding. DLQ messages without metadata are very difficult to investigate and reprocess.

execute_sql returns binary/unreadable data

Cause: DLQ messages may use a different serialisation format than expected. Solution: Try specifying the format in the query. Report the serialisation format issue and recommend consistent format usage.

Output Format

## DLQ Review Report

### Environment: {name}

### DLQ Topics Discovered
| DLQ Topic | Source Topic | Retention | Partitions | Has Consumers | Message Rate |
|-----------|-------------|-----------|------------|--------------|-------------|
| topic.dlq | topic | 7d | 3 | Yes | 12/hr |

### Critical (must fix)
- [topic/connector/file] Description of the issue
  Impact: {what could go wrong}
  Remediation: {how to fix}

### Warning (should fix)
- [topic/connector/file] Description of the issue
  Remediation: {how to fix}

### Suggestion (consider improving)
- [topic/connector/file] Description of the suggestion
  Recommendation: {how to improve}

### DLQ Metadata Completeness
| DLQ Topic | Original Topic | Error Message | Partition/Offset | Timestamp | Stack Trace | Retry Count |
|-----------|---------------|--------------|-----------------|-----------|-------------|-------------|
| topic.dlq | ✅ | ✅ | ⚠️ | ⚠️ | ❌ | ❌ |

### Maturity Assessment
| Consumer/Connector | DLQ Status | Maturity |
|-------------------|-----------|---------|
| consumer-name | Configured with monitoring | Complete |
| connector-name | Configured without monitoring | Basic |
| other-consumer | No DLQ | None |

### Summary
- X DLQ topics found
- Y consumers/connectors without DLQ
- Z unmonitored DLQ topics
- Overall DLQ maturity: none/basic/complete

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Kafka Dlq Review AI 技能有什么作用?

使用 Lenses MCP 服务器检查死信队列实现是否完整。检查 DLQ 主题是否存在、配置、监控、元数据保留、重试逻辑、重新处理路径,以及连接器 DLQ 配置是否一致。当用户说“检查死信队列”“检查 DLQ 设置”“审计 DLQ”,或询问错误处理、消息失败或重新处理时使用。请勿用于重新处理 DLQ 消息或管理消费者偏移量。

为什么在 TypingMind 中使用 Kafka Dlq Review?

因为您只需安装一次,就能搭配任何模型使用。Kafka Dlq Review 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Kafka Dlq Review?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/lensesio/agentic-engineering-for-apache-kafka/tree/main/skills/kafka-dlq-review。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Kafka Dlq Review?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Kafka Dlq Review 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Kafka Dlq Review 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Kafka Dlq Review AI 技能免费吗?

是的。lensesio 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇