yuz10 commented on a change in pull request #5653:
URL: https://github.com/apache/apisix/pull/5653#discussion_r760837218



##########
File path: docs/en/latest/plugins/rocketmq-logger.md
##########
@@ -0,0 +1,234 @@
+---
+title: rocketmq-logger
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Summary
+
+- [**Name**](#name)
+- [**Attributes**](#attributes)
+- [**Info**](#info)
+- [**How To Enable**](#how-to-enable)
+- [**Test Plugin**](#test-plugin)
+- [**Disable Plugin**](#disable-plugin)
+
+## Name
+
+`rocketmq-logger` is a plugin which provides the ability to push requests log 
data as JSON objects to your external rocketmq clusters.
+
+This plugin provides the ability to push requests log data as JSON objects to 
your external rocketmq clusters. In case if you did not receive the log data 
don't worry give it some time it will automatically send the logs after the 
timer function expires in our Batch Processor.
+
+For more info on Batch-Processor in Apache APISIX please refer.
+[Batch-Processor](../batch-processor.md)
+
+## Attributes
+
+| Name             | Type    | Requirement | Default        | Valid   | 
Description                                                                     
         |
+| ---------------- | ------- | ----------- | -------------- | ------- | 
----------------------------------------------------------------------------------------
 |
+| nameserver_list  | object  | required    |                |         | An 
array of rocketmq nameservers.                                                  
             |
+| topic            | string  | required    |                |         | Target 
 topic to push data.                                                            
  |
+| key              | string  | optional    |                |         | Keys 
of messages to send.                                               |
+| tag              | string  | optional   |                |         | Tags of 
messages to send.                           |
+| timeout          | integer | optional    | 3              | [1,...] | 
Timeout for the upstream to send data.                                          
         |
+| use_tls          | boolean | optional   | false          |         | Whether 
to open TLS                          |
+| access_key       | string  | optional   | ""             |         | access 
key for ACL, empty string means disable ACL.     |
+| secret_key       | string  | optional   | ""             |         | secret 
key for ACL。                         |
+| name             | string  | optional    | "rocketmq logger" |         | A  
unique identifier to identity the batch processor.                              
       |
+| meta_format      | enum    | optional    | "default"      | 
["default","origin"] | `default`: collect the request information with default 
JSON way. `origin`: collect the request information with original HTTP request. 
[example](#examples-of-meta_format)|
+| batch_max_size   | integer | optional    | 1000           | [1,...] | Set 
the maximum number of logs sent in each batch. When the number of logs reaches 
the set maximum, all logs will be automatically pushed to the `rocketmq` 
service.                         |
+| inactive_timeout | integer | optional    | 5              | [1,...] | The 
maximum time to refresh the buffer (in seconds). When the maximum refresh time 
is reached, all logs will be automatically pushed to the `rocketmq` service 
regardless of whether the number of logs in the buffer reaches the set maximum 
number. |
+| buffer_duration  | integer | optional    | 60             | [1,...] | 
Maximum age in seconds of the oldest entry in a batch before the batch must be 
processed.|
+| max_retry_count  | integer | optional    | 0              | [0,...] | 
Maximum number of retries before removing from the processing pipe line.        
         |
+| retry_delay      | integer | optional    | 1              | [0,...] | Number 
of seconds the process execution should be delayed if the execution fails.      
  |
+| include_req_body | boolean | optional    | false          | [false, true] | 
Whether to include the request body. false: indicates that the requested body 
is not included; true: indicates that the requested body is included. Note: if 
the request body is too big to be kept in the memory, it can't be logged due to 
Nginx's limitation. |
+| include_req_body_expr  | array  | optional    |          |         | When 
`include_req_body` is true, control the behavior based on the result of the 
[lua-resty-expr](https://github.com/api7/lua-resty-expr) expression. If 
present, only log the request body when the result is true. |
+| include_resp_body| boolean | optional    | false         | [false, true] | 
Whether to include the response body. The response body is included if and only 
if it is `true`. |
+| include_resp_body_expr  | array  | optional    |          |         | When 
`include_resp_body` is true, control the behavior based on the result of the 
[lua-resty-expr](https://github.com/api7/lua-resty-expr) expression. If 
present, only log the response body when the result is true. |
+
+### examples of meta_format
+
+- **default**:
+
+    ```json

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to