Skip to content

Commit

Permalink
doc: updated docs for the new format
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Pedro <[email protected]>
  • Loading branch information
antonio-pedro99 committed Dec 28, 2023
1 parent 8f3b791 commit 6f0d071
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions documentation/modules/con-requests-kafka-bridge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ API request and response bodies are always encoded as JSON.
Content-Type: application/vnd.kafka.v2+json
----

* When performing producer operations, `POST` requests must provide `Content-Type` headers specifying the _embedded data format_ of the messages produced. This can be either `json` or `binary`.
* When performing producer operations, `POST` requests must provide `Content-Type` headers specifying the _embedded data format_ of the messages produced. This can be either `json`, `binary` or `text`.
+
[cols="35,65",options="header",stripes="none",separator=¦]
|===
Expand All @@ -33,6 +33,9 @@ m¦Content-Type: application/vnd.kafka.json.v2+json
¦Binary
m¦Content-Type: application/vnd.kafka.binary.v2+json

¦Text
m¦Content-Type: application/vnd.kafka.text.v2+json

|===

The embedded data format is set per consumer, as described in the next section.
Expand All @@ -42,9 +45,9 @@ An empty body can be used to create a consumer with the default values.

== Embedded data format

The embedded data format is the format of the Kafka messages that are transmitted, over HTTP, from a producer to a consumer using the Kafka Bridge. Two embedded data formats are supported: JSON and binary.
The embedded data format is the format of the Kafka messages that are transmitted, over HTTP, from a producer to a consumer using the Kafka Bridge. Three embedded data formats are supported: JSON, binary and text.

When creating a consumer using the `/consumers/_groupid_` endpoint, the `POST` request body must specify an embedded data format of either JSON or binary. This is specified in the `format` field, for example:
When creating a consumer using the `/consumers/_groupid_` endpoint, the `POST` request body must specify an embedded data format of either JSON, binary or text. This is specified in the `format` field, for example:

[source,json,subs="attributes+"]
----
Expand Down

0 comments on commit 6f0d071

Please sign in to comment.