> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/build/v1/move/mode/stream.md).

# Streaming

Streaming movement runs a long-lived consumer that reads records from an event-streaming system in micro-batches and writes them to the sink. It processes records as they arrive, with no snapshot, cursor, or extraction window. Use it when the source is a message broker and events must land with minimal delay.

## When to use streaming

* The source is Apache Kafka or NATS JetStream.
* Events must be landed continuously, with minimal delay.
* The use case does not fit a scheduled batch window.
* You do not need transaction-log change capture; use [CDC](/build/v1/move/mode/cdc.md) for that.

## Before you begin

Ensure you have:

* A source topic or subject reachable from DataOS.
* A Depot for the source broker, or an approved connection with secrets projected via `use.projection`.
* A Depot for the destination, and a compute profile.

## 1. Choose your source

Streaming supports 2 brokers:

| Source         | Description                              |
| -------------- | ---------------------------------------- |
| Apache Kafka   | Topic-based event streams                |
| NATS JetStream | Subject-based persistent message streams |

For per-source options, see the [stream pipelines reference](https://v2.dataos.info/references/resources/nilus/stream/sample-configs) in References.

## 2. Write the manifest

Create a `nilus` resource with `spec.type: stream`:

```yaml
name: ${{pipeline-name}}
version: v1alpha
type: nilus
tags:
  - nilus-stream
description: ${{description}}
spec:
  type: stream
  compute: ${{compute-profile}}
  logLevel: INFO
  source:
    address: dataos://${{source-depot}}?purpose=ro
    options:
      source_table: "${{topic-or-subject}}"   # Kafka topic or NATS subject
  sink:
    address: dataos://${{sink-depot}}?purpose=rw
    options:
      dest_table: ${{schema.table}}
      incremental_strategy: append
```

## 3. Apply and confirm

```bash
dataos-ctl resource apply -f ${{path-to-manifest.yaml}}
dataos-ctl resource get -t nilus -n ${{pipeline-name}}
```

The pipeline runs continuously. Once events are landing, [explore the moved data](/build/v1/move/explore-moved-data.md) to confirm records are arriving as expected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/build/v1/move/mode/stream.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
