properties.json 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {
  2. "helpUrl": {
  3. "en_US": "https://github.com/emqx/kuiper/blob/master/docs/en/rules/overview.md",
  4. "zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh/rules/overview.md"
  5. },
  6. "properties": [{
  7. "name": "concurrency",
  8. "default":1,
  9. "optional":true,
  10. "control": "text",
  11. "type": "int",
  12. "hint": {
  13. "en_US": "Specify how many instances of the sink will be run. If the value is bigger than 1, the order of the messages may not be retained.",
  14. "zh_CN": "设置运行的线程数。该参数值大于1时,消息发出的顺序可能无法保证。"
  15. },
  16. "label": {
  17. "en_US": "Concurrency",
  18. "zh_CN": "线程数"
  19. }
  20. }, {
  21. "name": "bufferLength",
  22. "default": 1024,
  23. "optional":true,
  24. "type": "int",
  25. "control": "text",
  26. "hint": {
  27. "en_US": "Specify how many messages can be buffered in memory. If the buffered messages exceed the limit, the sink will block message receiving until the buffered messages have been sent out so that the buffered size is less than the limit.",
  28. "zh_CN": "设置可缓存消息数目。若缓存消息数超过此限制,sink将阻塞消息接收,直到缓存消息被消费使得缓存消息数目小于限制为止。"
  29. },
  30. "label": {
  31. "en_US": "Buffer length",
  32. "zh_CN": "缓存大小"
  33. }
  34. }, {
  35. "name": "runAsync",
  36. "default": false,
  37. "optional":true,
  38. "type": "bool",
  39. "control": "radio",
  40. "hint": {
  41. "en_US": "Whether the sink will run asynchronously for better performance. If it is true, the sink result order is not promised.",
  42. "zh_CN": "设置是否异步运行输出操作以提升性能。请注意,异步运行的情况下,输出结果顺序不能保证。"
  43. },
  44. "label": {
  45. "en_US": "Run async",
  46. "zh_CN": "是否异步运行"
  47. }
  48. }, {
  49. "name": "retryInterval",
  50. "default": 1000,
  51. "optional":true,
  52. "type": "int",
  53. "control": "text",
  54. "hint": {
  55. "en_US": "Specify how many milliseconds will the sink retry to send data out if the previous send failed. If the specified value <= 0, then it will not retry.",
  56. "zh_CN": "设置信息发送失败后重试等待时间,单位为毫秒。如果该值的设置 <= 0,那么不会尝试重新发送。"
  57. },
  58. "label": {
  59. "en_US": "Retry interval",
  60. "zh_CN": "失败重试间隔毫秒"
  61. }
  62. }, {
  63. "name": "cacheLength",
  64. "default": 1024,
  65. "optional":true,
  66. "type": "int",
  67. "control": "text",
  68. "hint": {
  69. "en_US": "Specify how many messages can be cached. The cached messages will be resent to external system until the data sent out successfully. The cached message will be sent in order except in runAsync or concurrent mode. The cached message will be saved to disk in fixed intervals.",
  70. "zh_CN": "设置最大消息缓存数量。缓存的消息会一直保留直到消息发送成功。缓存消息将按顺序发送,除非运行在异步或者并发模式下。缓存消息会定期存储到磁盘中。"
  71. },
  72. "label": {
  73. "en_US": "Cache length",
  74. "zh_CN": "最大消息缓存数量"
  75. }
  76. }, {
  77. "name": "cacheSaveInterval",
  78. "default": 1024,
  79. "optional":true,
  80. "type": "int",
  81. "control": "text",
  82. "hint": {
  83. "en_US": "Specify the interval to save cached message to the disk. Notice that, if the rule is closed in plan, all the cached messages will be saved at close. A larger value can reduce the saving overhead but may lose more cache messages when the system is interrupted in error.",
  84. "zh_CN": "设置缓存存储间隔时间,单位为毫秒。需要注意的是,当规则关闭时,缓存会自动存储。该值越大,则缓存保存开销越小,但系统意外退出时缓存丢失的风险变大。"
  85. },
  86. "label": {
  87. "en_US": "Cache save interval",
  88. "zh_CN": "缓存间隔毫秒"
  89. }
  90. }, {
  91. "name": "omitIfEmpty",
  92. "default":false,
  93. "optional": true,
  94. "type": "bool",
  95. "control": "radio",
  96. "hint": {
  97. "en_US": "If the configuration item is set to true, when SELECT result is empty, then the result will not feed to sink operator.",
  98. "zh_CN": "如果选择结果为空,则忽略输出。"
  99. },
  100. "label": {
  101. "en_US": "Omit if content is empty",
  102. "zh_CN": "是否忽略输出"
  103. }
  104. }, {
  105. "name": "sendSingle",
  106. "default":true,
  107. "optional": true,
  108. "type": "bool",
  109. "control": "radio",
  110. "hint": {
  111. "en_US": "The output messages are received as an array. This is indicate whether to send the results one by one. If false, the output message will be {\"result\":\"${the string of received message}\"}. For example, {\"result\":\"[{\"count\":30},\"\"count\":20}]\"}. Otherwise, the result message will be sent one by one with the actual field name. For the same example as above, it will send {\"count\":30}, then send {\"count\":20} to the RESTful endpoint.Default to false.",
  112. "zh_CN": "输出消息以数组形式接收,该属性意味着是否将结果一一发送。 如果为 false,则输出消息将为{\"result\":\"${the string of received message}\"}。 例如,{\"result\":\"[{\"count\":30},\"\"count\":20}]\"}。否则,结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例,它将发送 {\"count\":30},然后发送{\"count\":20} 到 RESTful 端点。默认为 false。"
  113. },
  114. "label": {
  115. "en_US": "Send single",
  116. "zh_CN": "将结果数据按条发送"
  117. }
  118. }, {
  119. "name": "dataTemplate",
  120. "default":"",
  121. "optional": true,
  122. "type": "string",
  123. "control": "textarea",
  124. "hint": {
  125. "en_US": "The golang template format string to specify the output data format. The input of the template is the sink message which is always an array of map. If no data template is specified, the raw input will be the data.",
  126. "zh_CN": "Golang 模板格式字符串,用于指定输出数据格式。 模板的输入是目标消息,该消息始终是 map 数组。 如果未指定数据模板,则将数据作为原始输入。"
  127. },
  128. "label": {
  129. "en_US": "Data template",
  130. "zh_CN": "数据模版"
  131. }
  132. }]
  133. }