You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Kafka protocol consumption API
OpenKafkaConsumer
Copy page
Download PDF
OpenKafkaConsumer
Call the OpenKafkaConsumer interface to enable Kafka protocol consumption for the specified log topic.​
Usage notes​
After calling this interface to enable the Kafka protocol consumption function for log topics, log topics can be consumed as Kafka Topics, and each log corresponds to a Kafka message. For the specific method and configuration of consuming logs through the Kafka protocol, please refer to Consuming logs through the Kafka protocol.​
The frequency of this interface call is limited to 20 times/s, and an ExceedQPSLimit error will be reported if the frequency limit is exceeded.​
tip​
  • Private or public network read traffic will be generated when consuming logs.​
  • Turn off the Kafka protocol consumption function for 2 minutes before turning it on again.​
Request syntax​
  • Request Method:PUT​
  • Request URL:https://{tls-endpoint}/OpenKafkaConsumer​
Request parameters​
Body​
​
Name​
Type​
Required​
Example​
Description​
TopicId​
String​
True​
0fdaa6b6-3c9f-424c-8664-fc0d222c****​
Topic ID.​
​
Responses​
none​
Sample Request​
​
PUT https://{tls-endpoint}/OpenKafkaConsumer HTTP/1.1​
Content-Type: application/json​
{​
"TopicId": "66********"​
}​
​
Sample Response​
​
HTTP/1.1 200 OK​
Content-Type: application/json; charset=utf-8​
{}​
​
Error code​
For more information, see Common error codes.​
​
HTTP status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
Parameter is invalid.​
404​
TopicNotExist​
topic %s does not exist.​
The journal topic does not exist.​
400​
ConsumeTopicOperateDisable​
Please try this operator for consume topic after 2min.​
Do not operate frequently, please do it again after 2 minutes.​
500​
InternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error.​
​
​
Last updated: 2025.10.28 18:42:00