POST /topics/{string: topic_name}/partitions/{string: partition_id}
Produces messages into a partition of a topic.
Description
Depending on the configuration, the type of information retrieved has different behavior.
See the streams.default.stream
in Configuration Parameters.
Parameters Defined | Response |
---|---|
streams.default.stream is defined | Produces messages into a partition of HPE Ezmeral Data Fabric Streams topic. The user could pass fully qualified topic name or not. If a fully qualified topic name is not used, messages are produced into topics in the default stream path. |
streams.default.stream is not defined | Produces messages into a partition within HPE Ezmeral Data Fabric Streams topic. The user could only pass fully qualified topic name that contains stream path. |
Parameters | Description |
---|---|
topic_name (string) | Topic to produce the messages to. |
partition_id (int) | Partition to produce the messages to. |
Syntax
http://<host>:8082/topics/<topic_name>/partitions/<partition_id>
Request Example
curl -X POST -H "Content-Type: application/vnd.kafka.binary.v2+json" --data
'{"records":[{"key":"a2v5","value":"Y29uZmx1ZW50"}]}'
"http://localhost:8082/topics/testtopic1/partitions/0"
Response Example
{
"offsets":
[{
"partition":0,
"offset":1,
"error_code":null,"error":null}
],
"key_schema_id":null,
"value_schema_id":null
}