resend_message
Resend a Kafka message to a specified topic, partition, and offset for reprocessing or recovery in data pipelines.
Instructions
Resend a Kafka message.
Args: environment: The environment name. topic_name: Name of the topic. partition: Kafka partition number. offset: Kafka offset.
Returns: Resend operation result with partition and offset.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | ||
| topic_name | Yes | ||
| partition | Yes | ||
| offset | Yes |
Implementation Reference
- src/lenses_mcp/tools/topics.py:213-233 (handler)The core handler function for the 'resend_message' tool. It is decorated with @mcp.tool() for automatic registration and schema inference from signature and docstring. Performs a PUT request to the Lenses API to resend the specified Kafka message.@mcp.tool() async def resend_message( environment: str, topic_name: str, partition: int, offset: int ) -> Dict[str, Any]: """ Resend a Kafka message. Args: environment: The environment name. topic_name: Name of the topic. partition: Kafka partition number. offset: Kafka offset. Returns: Resend operation result with partition and offset. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/topics/{topic_name}/{partition}/{offset}/resend" return await api_client._make_request("PUT", endpoint)
- src/lenses_mcp/server.py:33-33 (registration)Top-level registration of the topics module, which includes the 'resend_message' tool, by calling register_topics on the FastMCP instance.register_topics(mcp)
- src/lenses_mcp/server.py:17-17 (registration)Import of the register_topics function required to register the tools including 'resend_message'.from tools.topics import register_topics