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ファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    lensesioがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Kafka Dlq Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

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

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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を有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にKafka Dlq Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Kafka Dlq Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じ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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Kafka Dlq Review」では何ができますか?

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を読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Kafka Dlq Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Kafka Dlq Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもKafka Dlq Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Kafka Dlq Review」は無料ですか?

はい。lensesioがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇