> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/2.1/pipeline/outputs/kafka-rest-proxy.md).

# Kafka REST Proxy

The **kafka-rest** output plugin, allows to flush your records into a [Kafka REST Proxy](http://docs.confluent.io/current/kafka-rest/docs/index.html) server. The following instructions assumes that you have a fully operational Kafka REST Proxy and Kafka services running in your environment.

## Configuration Parameters

| Key               | Description                                                                           | default           |
| ----------------- | ------------------------------------------------------------------------------------- | ----------------- |
| Host              | IP address or hostname of the target Kafka REST Proxy server                          | 127.0.0.1         |
| Port              | TCP port of the target Kafka REST Proxy server                                        | 8082              |
| Topic             | Set the Kafka topic                                                                   | fluent-bit        |
| Partition         | Set the partition number (optional)                                                   |                   |
| Message\_Key      | Set a message key (optional)                                                          |                   |
| Time\_Key         | The Time\_Key property defines the name of the field that holds the record timestamp. | @timestamp        |
| Time\_Key\_Format | Defines the format of the timestamp.                                                  | %Y-%m-%dT%H:%M:%S |
| Include\_Tag\_Key | Append the Tag name to the final record.                                              | Off               |
| Tag\_Key          | If Include\_Tag\_Key is enabled, this property defines the key name for the tag.      | \_flb-key         |

### TLS / SSL

Kafka REST Proxy output plugin supports TTL/SSL, for more details about the properties available and general configuration, please refer to the [TLS/SSL](/manual/2.1/pipeline/outputs/tcp-and-tls.md) section.

## Getting Started

In order to insert records into a Kafka REST Proxy service, you can run the plugin from the command line or through the configuration file:

### Command Line

The **kafka-rest** plugin, can read the parameters from the command line in two ways, through the **-p** argument (property), e.g:

```
$ fluent-bit -i cpu -t cpu -o kafka-rest -p host=127.0.0.1 -p port=8082 -m '*'
```

### Configuration File

In your main configuration file append the following *Input* & *Output* sections:

```python
[INPUT]
    Name  cpu
    Tag   cpu

[OUTPUT]
    Name        kafka-rest
    Match       *
    Host        127.0.0.1
    Port        8082
    Topic       fluent-bit
    Message_Key my_key
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluentbit.io/manual/2.1/pipeline/outputs/kafka-rest-proxy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
