> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condense.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Split Utility

The Split Utility routes real-time events from a single Kafka stream to one or more destination topics based on configurable rule conditions. It enables intelligent stream routing by evaluating each incoming event against multiple routing profiles and directing it to the appropriate downstream pipeline.

Unlike the Merge Utility, which combines multiple streams, or the Enrich Utility, which augments events with reference data, the Split Utility evaluates a single event and determines where it should be routed based on configurable business rules.

## Key Capabilities

The Split Utility enables you to:

* Route a single input stream to multiple Kafka topics.
* Create multiple routing profiles with independent rule sets.
* Configure **First Match Only** or **Broadcast** routing strategies.
* Build complex routing logic using nested AND/OR rule groups.
* Use fields from incoming events to define routing conditions.
* Validate and preview the incoming event schema before deployment.
* Duplicate routing profiles for faster configuration.
* Preview routing logic before deploying the utility.

## How It Works

The Split Utility follows a two-step configuration workflow.

### Step 1: Stream Connection

Configure the source stream and prepare the event schema for rule creation.

During this step you configure:

* Utility Name
* Source Kafka Topic or JSON Upload
* Event Schema Validation
* Field Type Detection

The utility extracts all available fields from the incoming event and prepares them for use in routing rules.

### Step 2: Configure Rules

Once the schema has been identified, configure one or more routing profiles.

Each profile contains:

* Profile Name
* Destination Kafka Topic
* Rule Groups
* Routing Conditions

Each incoming event is evaluated against these profiles before being routed to the appropriate destination topic.

***

# Stream Configuration

## Source Stream

Select the Kafka topic that contains the events to be routed.

Alternatively, upload a sample JSON payload to generate the event schema before deployment.

The detected schema is used throughout the rule builder.

***

## Schema Validation

Before creating routing rules, the utility validates the incoming payload and extracts all available fields.

Detected field types include:

* String
* Integer
* Float
* Boolean

Field types determine which operators are available while building routing conditions.

***

# Routing Configuration

## Routing Profiles

A routing profile represents one logical routing path.

Each profile contains:

* Profile Name
* Destination Topic
* Rule Groups

Multiple profiles can be configured within a single Split Utility.

***

## Routing Strategy

The Split Utility supports two routing strategies.

### First Match Only

Events are evaluated sequentially against each routing profile.

Once a profile evaluates to **TRUE**, the event is routed to its destination topic and no additional profiles are evaluated.

This strategy is recommended when each event should be processed by only one downstream pipeline.

### Broadcast

Every routing profile is evaluated independently.

If multiple profiles match, the event is duplicated and published to every matching destination topic.

This strategy is useful when multiple downstream applications require the same event.

***

## Rule Builder

Rules determine whether an incoming event matches a routing profile.

The utility supports:

* Multiple rule groups
* Nested AND / OR conditions
* Field-to-value comparisons
* Field-to-field comparisons
* Data type specific operators

Operators available depend on the selected field type.

Examples include:

* Equals
* Not Equals
* Greater Than
* Less Than
* Contains

***

# Output Topics

Each routing profile publishes matching events to its own Kafka topic.

This allows downstream pipelines to independently process different categories of events without additional filtering.

Example:

| Profile             | Destination Topic     |
| :------------------ | :-------------------- |
| High Speed Vehicles | vehicle.high.speed    |
| Engine Alerts       | vehicle.engine.alerts |
| Normal Traffic      | vehicle.normal        |

***

# Rule Preview

Before deployment, the Split Utility generates a live preview of the configured routing logic.

The preview helps verify:

* Rule evaluation
* Destination topics
* Logical grouping
* Event routing behavior

This allows routing issues to be identified before the utility is deployed.

## Example

Input Event

```json theme={null}
{
  "speed": 112,
  "engineStatus": "NORMAL",
  "vehicleType": "Truck"
}
```

Configured Rules

```text theme={null}
Profile: High Speed

speed > 100

Destination:
vehicle.high.speed
```

Output

The event is published to:

```text theme={null}
vehicle.high.speed
```

If the routing strategy is **Broadcast**, the same event can also be delivered to additional topics if it satisfies other routing profiles.

# Deploying the Utility

After completing the configuration:

1. Configure the source stream.
2. Validate the incoming schema.
3. Create one or more routing profiles.
4. Define routing conditions.
5. Configure destination Kafka topics.
6. Review the routing preview.
7. Click **Deploy Utility**.

Once deployed, the Split Utility continuously evaluates every incoming event and routes it to the configured Kafka topics in real time.

# Best Practices

* Create dedicated routing profiles for each business use case.
* Use descriptive profile names and destination topics.
* Use **First Match Only** when events should belong to a single processing pipeline.
* Use **Broadcast** only when events need to be consumed by multiple downstream applications.
* Validate field types before creating routing conditions.
* Review routing logic using the preview before deployment.
* Monitor routed topics to verify rule behavior after deployment.
