# Synchronous Responses

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

---
title: Synchronous Responses
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: sync_responses
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: sync_responses.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/guides/pages/sync_responses.adoc
description: Understand synchronous response handling in Redpanda Connect, ensuring reliable and efficient data processing.
page-git-created-date: "2024-05-24"
page-git-modified-date: "2025-06-25"
---

<!-- Source: https://docs.redpanda.com/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/connect/components/outputs/sync_response/) output.

Use the `http_server` input in Self-Managed deployments:

```yaml
input:
  http_server:
    path: /weather

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/connect/components/outputs/broker/) output.

```yaml
input:
  http_server:
    path: /weather

output:
  broker:
    pattern: fan_out
    outputs:
      - kafka:
          addresses: [localhost:9092]
          topic: weather.requests
      - 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/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.

## [](#routing-output-responses-back)Routing output responses back

Some outputs, such as [`http_client`](https://docs.redpanda.com/connect/components/outputs/http_client/), support returning a downstream response back to the input.

```yaml
input:
  http_server:
    path: /proxy-weather

output:
  http_client:
    url: https://api.example.com/forecast
    verb: POST
    propagate_response: true
```

This forwards the request to an external weather API and returns its response to the original requester.

You can combine this with other outputs:

```yaml
input:
  http_server:
    path: /proxy-weather

output:
  broker:
    pattern: fan_out
    outputs:
      - kafka:
          addresses: [localhost:9092]
          topic: weather.proxy
      - http_client:
          url: https://api.example.com/forecast
          verb: POST
          propagate_response: true
```