# Arroyo

A video walkthrough can be found below:

{% embed url="<https://youtu.be/vI7lElHT9V4>" %}

## Prerequisites

1. WarpStream account - get access to WarpStream by registering [here](https://console.warpstream.com/signup).
2. Arroyo is installed and running - instructions are found [here](https://doc.arroyo.dev/introduction).
3. WarpStream cluster up and running.

## Step 1: Create a topic in your WarpStream cluster

Obtain the Bootstrap Broker from the WarpStream console by navigating to your cluster and clicking the Connect tab. If you don't have SASL credentials yet, you can also [create a set of credentials](https://docs.warpstream.com/warpstream/kafka/manage-security/sasl-authentication#creating-credentials) from the console.

Store these values for easy reference; they will be needed in Arroyo. If you are going to produce records to your topic from the command line, then export them in a terminal window:

```bash
export BOOTSTRAP_HOST=<YOUR_BOOTSTRAP_BROKER> \
SASL_USERNAME=<YOUR_SASL_USERNAME> \
SASL_PASSWORD=<YOUR_SASL_PASSWORD>;
```

Then, create a topic in the WarpStream console if you don't already have one.

## Step 2: Produce some records

You can use the WarpStream CLI to produce messages to your topic if you don't already have an active topic to work with:

{% code overflow="wrap" %}

```bash
warpstream kcmd -bootstrap-host $BOOTSTRAP_HOST -tls -username $SASL_USERNAME -password $SASL_PASSWORD -type produce -topic arroyo_demo --records '{"action": "click", "user_id": "user_0", "page_id": "home"},,{"action": "hover", "user_id": "user_0", "page_id": "home"},,{"action": "scroll", "user_id": "user_0", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_1", "page_id": "home"},,{"action": "click", "user_id": "user_2", "page_id": "home"}'
```

{% endcode %}

Note that the WarpStream CLI uses double commas (`,,)` as a delimiter between JSON records.

## Step 3: Launch and connect Arroyo

Launch Arroyo with `arroyo cluster` and then open the Arroyo Web UI at `http://localhost:5115/`. which will present the following screen, and you'll want to click on "**Connections**" and then click on "**Create Connection**":

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-e615d0ffdbff4fd6726fb7e3e241ae7c021abeb6%2Fimage.png?alt=media" alt=""><figcaption><p>Create Arroyo Connection</p></figcaption></figure>

Select "**Kafka**" from the list of available connections:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-dcfe75188e8081abd247b3b745f915d592384901%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Now file in the connection information as shown below:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-fdb35cfc9f457799b74a2bdce28a8d682306835b%2Fi1.png?alt=media" alt=""><figcaption><p>Alloy Kafka Config</p></figcaption></figure>

Click on the "**Validate**" button, and if there are no errors, the button will change to "**Create**", which you will then click and be presented with this screen:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-8035722f67b62966f45f0e496018210973a7f784%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

The available Topics for the cluster will be in the drop-down list. Select the one you want to work with, set the other fields as desired, and click "**Next**." This will display the following screen to define the schema:

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-1d1689fff22eae65527881c216e5d251e37016f9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Select the applicable information on this page and click "**Next**" to get to the final validation and Create step.

## Next Steps

From here, you can configure a data pipeline in Arroyo that ingests from a WarpStream producer.

Next, check out the WarpStream docs for configuring the [WarpStream Agent](https://docs.warpstream.com/warpstream/agent-setup/deploy), or review the [Arroyo Docs](https://doc.arroyo.dev/introduction) to learn more about what is possible with WarpStream and Arroyo!
