expanso-content-splitting

Split batch payloads into individual messages with Kafka and file-based DLQ routing.

1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/expanso-io/expanso-skills --skill expanso-content-splitting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expanso-content-splitting
Source: https://github.com/expanso-io/expanso-skills/tree/main/skills/recipes/content-splitting
Command: npx skills add https://github.com/expanso-io/expanso-skills --skill expanso-content-splitting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of splitting incoming data batches into individual messages, routing them to different destinations based on their content and validity.

Core Features & Use Cases

  • Dynamic Data Splitting: Handles various input formats like JSON arrays, CSV records, or raw arrays, splitting them into individual records.
  • Content-Based Routing: Validates each individual item and routes valid items to a processing queue (e.g., Kafka) and invalid items to a dead-letter queue (e.g., file).
  • Use Case: Process a large daily batch of customer orders, splitting each order into its own message for individual fulfillment and logging any malformed orders for review.

Quick Start

Run the content splitting pipeline with sample data using the provided shell script.

Frequently Asked Questions about expanso-content-splitting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a JSON array into individual messages for Kafka routing?

Splitting a JSON array into individual messages for Kafka routing involves parsing the batch payload and validating each record. Valid items are routed to Kafka, while invalid items are sent to a file-based dead-letter queue for review.

What is the best way to route invalid records to a dead-letter queue during batch processing?

Routing invalid records to a dead-letter queue during batch processing requires content-based validation. Invalid items are diverted to a file-based DLQ, while valid items are routed to a processing queue like Kafka.

Can I process raw arrays and CSV records for content-based routing?

Processing raw arrays and CSV records for content-based routing is supported. The pipeline splits various input formats into individual records, enriches each with batch context, and routes them based on validation status.

Does this message splitting pipeline enrich individual items with batch context?

This message splitting pipeline enriches individual items with batch context during the splitting process. Each record from the JSON array or raw array is processed and tagged before routing to either Kafka or a file-based DLQ.

How do I separate malformed orders from a daily batch for individual fulfillment?

Separating malformed orders from a daily batch involves splitting the payload into individual messages and validating each one. Malformed orders are routed to a file-based dead-letter queue for logging and review.

What are the limitations of file-based dead-letter queues for invalid message routing?

File-based dead-letter queues for invalid message routing are limited to local or file system storage. Invalid items are logged to files rather than being sent to a distributed queue like Kafka, which may impact downstream retry automation.