# Synchronous Responses

> 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: Synchronous Responses
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/sync_responses
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/guides/sync_responses.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/guides/sync_responses.adoc
description: Understand synchronous response handling in Redpanda Connect, ensuring reliable and efficient data processing.
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/sync_responses.md -->

In a regular Redpanda Connect pipeline, messages flow in one direction and acknowledgements in the other:

```text
    ----------- Message ------------->

Input (AMQP) -> Processors -> Output (AMQP)

    <------- Acknowledgement ---------
```

However, Redpanda Connect supports bidirectional protocols like HTTP and WebSocket, which allow responses to be returned directly from the pipeline.

For example, HTTP is a request/response protocol, and inputs like `http_server` (Self-Managed) or `gateway` (Redpanda Cloud) support returning response payloads to the requester.

```text
           --------- Request Body -------->

Input (HTTP) -> Processors -> Output (Sync Response)

           <--- Response Body (and ack) ---
```

## [](#routing-processed-messages-back)Routing processed messages back

To return a processed response, use the [`sync_response`](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/sync_response/) output.

Use the `gateway` input in Redpanda Cloud:

```yaml
input:
  gateway: {}

pipeline:
  processors:
    - mapping: |
        root = {
          city: json("location"),
          forecast: "Clear skies with light winds",
          temperature_c: 22
        }

output:
  sync_response: {}
```

Sending this request:

```json
{ "location": "Berlin" }
```

Returns:

```json
{
  "city": "Berlin",
  "forecast": "Clear skies with light winds",
  "temperature_c": 22
}
```

## [](#combine-with-other-outputs)Combine with other outputs

You can route processed messages to storage and return a response using a [`broker`](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/broker/) output.

```yaml
input:
  gateway: {}

output:
  broker:
    pattern: fan_out
    outputs:
      - redpanda:
          seed_brokers:
            - ${REDPANDA_BROKERS}
          topic: weather.requests
          tls:
            enabled: true
          sasl:
            - mechanism: SCRAM-SHA-256
              username: ${secrets.USERNAME}
              password: ${secrets.PASSWORD}
      - sync_response:
          processors:
            - mapping: |
                root = {
                  status: "received",
                  received_at: now()
                }
```

## [](#returning-partially-processed-messages)Returning partially processed messages

You can return a response before the message is fully processed by using the [`sync_response` processor](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/sync_response/).

This allows continued processing after the response is set.

```yaml
pipeline:
  processors:
    - mapping: root = "Received weather report for %s".format(json("location"))
    - sync_response: {}
    - mapping: root.reported_at = now()
```

This returns `"Received weather report for Berlin"` to the client, but continues modifying the message before storing or forwarding it.

> 📝 **NOTE**
>
> Due to delivery guarantees, the response is not sent until all downstream processing and acknowledgements are complete.