# Ingest Real-Time Sensor Telemetry with the HTTP Gateway

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: Ingest Real-Time Sensor Telemetry with the HTTP Gateway
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: connect/guides/cloud/gateway
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/guides/cloud/gateway.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/guides/cloud/gateway.adoc
description: Learn how to stream sensor telemetry data into Redpanda Cloud using the gateway input in Redpanda Connect.
page-git-created-date: "2025-06-25"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/guides/cloud/gateway.md -->

In this guide, you’ll build a pipeline that uses the `gateway` input to receive real-time telemetry data from sensors over HTTP. Each incoming message is normalized, published to a Redpanda topic, and acknowledged back to the sender.

This setup is ideal for IoT, mobile, and embedded systems that need to stream data to Redpanda Cloud without using a Kafka client.

The `gateway` input exposes a secure HTTP endpoint, simplifying ingestion from devices. Because HTTP is universally supported, it’s easier to integrate on constrained devices, microcontrollers, or languages that don’t support Kafka natively.

Additional benefits:

-   **Simplified security**: Devices authenticate with Redpanda Cloud API tokens (using Bearer headers). No need to embed Kafka credentials, manage TLS, or expose brokers publicly.

-   **Operational flexibility**: Devices are decoupled from Kafka internals like topics or schemas. You can evolve pipeline logic without touching device code.

-   **Automatic provisioning**: Redpanda Cloud generates a secure endpoint URL when you deploy the pipeline.


## [](#prerequisites)Prerequisites

-   A Redpanda Cloud cluster (Serverless, Dedicated, or BYOC)

-   cURL or another compatible HTTP client


## [](#create-a-sensor-user-in-redpanda-cloud)Create a sensor user in Redpanda Cloud

A sensor user is required to securely authenticate and manage access to the `sensor.telemetry` topic, ensuring that only authorized devices can produce messages to the topic.

1.  [Log in to Redpanda Cloud](https://cloud.redpanda.com).

2.  Go to **Topics** and create a topic named `sensor.telemetry`. This topic will be used to store incoming telemetry messages.

3.  Go to **Security** and create a user with the following details:

    -   **Username**: `sensor-sasl-user`

    -   **Password**: `<password>` (choose a secure password)

    -   **SASL Mechanism**: `SCRAM-SHA-256`


4.  Copy the password and save it securely for the next step.

5.  Go to **Secrets Store** and create a new secret named `SENSOR_SASL_PASSWORD` with the value of the password you set for the user.

    -   Set the scope of the secret to Redpanda Cluster and Redpanda Connect.


6.  Go to **Security > ACLs** and create an access policy for the `sensor-sasl-user` user. This policy should allow the user to produce messages to the `sensor.telemetry` topic.


## [](#create-a-service-account)Create a service account

The service account is used to authenticate requests to the gateway endpoint. It provides a secure way to manage access to the gateway without embedding sensitive credentials in your devices.

1.  [Create a new service account](https://cloud.redpanda.com/service-accounts/new) in Redpanda Cloud named `sensor-ingest` and give it a description like "Service account for sensor telemetry ingestion".

2.  Copy the client ID and secret.

3.  Request a new API token for the service account. This token will be used to authenticate requests to the gateway.

    ```bash
    curl --request POST \
      --url 'https://auth.prd.cloud.redpanda.com/oauth/token' \
      --header 'content-type: application/x-www-form-urlencoded' \
      --data grant_type=client_credentials \
      --data client_id=<client-id> \
      --data client_secret=<client-secret> \
      --data audience=cloudv2-production.redpanda.cloud
    ```

    Replace `<client-id>` and `<client-secret>` with the values you copied from the service account. The request response provides an access token that remains **valid for one hour**.

4.  Set the access token as an environment variable:

    ```bash
    export CLOUD_API_TOKEN=<access_token>
    ```


## [](#create-a-redpanda-cloud-pipeline)Create a Redpanda Cloud pipeline

1.  Go to **Connect** and click **Create Pipeline**.

2.  Name the pipeline `sensor-telemetry-ingest` and give it a description like "Ingest real-time sensor telemetry data".

3.  Paste the following pipeline configuration into the editor:

    ```yaml
    input:
      gateway:
        rate_limit: "limit"

    rate_limit_resources:
      - label: limit
        local:
          count: 100
          interval: 1s

    pipeline:
      processors:
        - bloblang: |
            root.sensor_id = this.sensor_id
            root.type = this.type
            root.value = this.value
            root.unit = this.unit
            root.received_at = now()

    output:
      broker:
        pattern: fan_out_sequential
        outputs:
          - redpanda:
              seed_brokers:
                - ${REDPANDA_BROKERS}
              topic: sensor.telemetry
              tls:
                enabled: true
              sasl:
                - mechanism: SCRAM-SHA-256
                  username: sensor-sasl-user
                  password: ${secrets.SENSOR_SASL_PASSWORD}
          - sync_response:
              processors:
                - mapping: |
                    root = {
                      "status": "ok",
                      "received_at": now()
                    }
    ```

    This pipeline listens for incoming telemetry messages over HTTP and processes each one in real time. Here’s what each section does:

    -   `input.gateway`: Defines the input source. It exposes a secure HTTP endpoint that devices can post to. The optional `rate_limit` named `limit` is applied to protect the pipeline from overload.

    -   `rate_limit_resources.limit`: Limits traffic to 100 requests per second. If this rate is exceeded, HTTP requests are rejected with a 429 response.

    -   `pipeline.processors.bloblang`: Normalizes the incoming message by copying fields and adding a `received_at` timestamp (using the current time).

    -   `output.broker`: Uses a `fan_out_sequential` pattern to send each message to two outputs:

        -   The first output publishes the normalized message to the `sensor.telemetry` Redpanda topic.

        -   The second output sends a synchronous JSON response back to the sender confirming receipt.



4.  Click **Start**.

    The pipeline starts deploying. When the state changes to "Running", the pipeline is ready to accept incoming messages.

5.  Click the pipeline to view its details.

    When the pipeline is deployed, a URL is displayed. This is the HTTP endpoint to which you’ll post sensor data.

6.  Copy the URL.


## [](#send-sensor-data)Send sensor data

Send test data using cURL. Replace `<gateway-url>` with the URL provided by Redpanda Cloud when you deployed the pipeline.

```bash
curl -X POST <gateway-url> \
  -H "Authorization: Bearer $CLOUD_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sensor_id": "thermo-42",
    "type": "temperature",
    "value": 21.7,
    "unit": "C"
  }'
```

Expected response:

```json
{
  "received_at":"2025-06-17T09:48:50.986719231Z",
  "sensor_id":"thermo-42",
  "type":"temperature",
  "unit":"C",
  "value":21.7
}
```

You can verify that the message was successfully ingested by checking the `sensor.telemetry` topic in Redpanda Cloud.

To verify that the rate limit is working, try sending more than 100 requests per second. You should receive a 429 response with a `Retry-After` header indicating when to retry.

```bash
seq 1 300 | xargs -n1 -P50 -I{} curl -s -o /dev/null -w "%{http_code}\n" \
  -X POST <gateway-url> \
  -H "Authorization: Bearer $CLOUD_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sensor_id":"test", "value": 42}'
```

You should see a mixture of `200` and `429` responses, indicating that the rate limit is being enforced.

## [](#monitor-the-pipeline)Monitor the pipeline

You can monitor the pipeline’s logs in the Redpanda Cloud UI.

1.  Go to **Connect** and select the `sensor-telemetry-ingest` pipeline.

2.  Click on the **Logs** tab to view real-time logs of the pipeline’s activity. You can see any errors that occur during processing.


## [](#next-steps)Next steps

-   Filter or enrich events with conditional Bloblang.

-   Route messages by `sensor.type` to different topics.


## [](#suggested-reading)Suggested reading

-   [`gateway` input reference](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/inputs/gateway/)

-   [Bloblang functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/)

-   [Redpanda Cloud API authentication](https://docs.redpanda.com/api/doc/cloud-dataplane/authentication)