POST /topics/{string: topic_name}

Produces messages to a topic.


Depending on the configuration, the type of information retrieved has different behavior. See the in Configuration Parameters

Table 1. Response Behavior
Parameters Defined Response is defined

Produces messages into specific MapR Event Store For Apache Kafka topics. If the topic name does not contain a stream path, then the default stream path is used. is not defined

Produces messages into a MapR Event Store For Apache Kafka topic. The topic name should contain a stream path and be encoded.

Note: If the topic does not exist, the following error results: [“error_code”:40401, “message”: ”Topic not found.”}. New topics are not created by the POST operation.
Table 2. Parameters
Parameters Description
topic_name (string) Name of the topic to produce the messages to.



Request Example

This example produces a message using binary embedded data with the value, Kafka, to the topic, test.

curl -X POST -H "Content-Type: application/vnd.kafka.binary.v2" --data
'{"records":[{"value":"S2Fma2E="}]}' "http://localhost:8082/topics/test"

Response Example

        "offset": 1,