{
	"helpUrl": {
		"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en/rules/overview.md",
		"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh/rules/overview.md"
	},
	"properties": [{
		"name": "concurrency",
		"default":1,
		"optional":true,
		"control": "text",
		"type": "int",
		"hint": {
			"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.",
			"zh_CN": "设置运行的线程数。该参数值大于1时，消息发出的顺序可能无法保证。"
		},
		"label": {
			"en_US": "Concurrency",
			"zh_CN": "线程数"
		}
	}, {
		"name": "bufferLength",
		"default": 1024,
		"optional":true,
		"type": "int",
		"control": "text",
		"hint": {
			"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.",
			"zh_CN": "设置可缓存消息数目。若缓存消息数超过此限制，sink将阻塞消息接收，直到缓存消息被消费使得缓存消息数目小于限制为止。"
		},
		"label": {
			"en_US": "Buffer length",
			"zh_CN": "缓存大小"
		}
	}, {
		"name": "runAsync",
		"default": false,
		"optional":true,
		"type": "bool",
		"control": "radio",
		"hint": {
			"en_US": "Whether the sink will run asynchronously for better performance. If it is true, the sink result order is not promised.",
			"zh_CN": "设置是否异步运行输出操作以提升性能。请注意，异步运行的情况下，输出结果顺序不能保证。"
		},
		"label": {
			"en_US": "Run async",
			"zh_CN": "是否异步运行"
		}
	}, {
		"name": "retryInterval",
		"default": 1000,
		"optional":true,
		"type": "int",
		"control": "text",
		"hint": {
			"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.",
			"zh_CN": "设置信息发送失败后重试等待时间，单位为毫秒。如果该值的设置 <= 0，那么不会尝试重新发送。"
		},
		"label": {
			"en_US": "Retry interval",
			"zh_CN": "失败重试间隔毫秒"
		}
	}, {
		"name": "cacheLength",
		"default": 1024,
		"optional":true,
		"type": "int",
		"control": "text",
		"hint": {
			"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.",
			"zh_CN": "设置最大消息缓存数量。缓存的消息会一直保留直到消息发送成功。缓存消息将按顺序发送，除非运行在异步或者并发模式下。缓存消息会定期存储到磁盘中。"
		},
		"label": {
			"en_US": "Cache length",
			"zh_CN": "最大消息缓存数量"
		}
	}, {
		"name": "cacheSaveInterval",
		"default": 1024,
		"optional":true,
		"type": "int",
		"control": "text",
		"hint": {
			"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.",
			"zh_CN": "设置缓存存储间隔时间，单位为毫秒。需要注意的是，当规则关闭时，缓存会自动存储。该值越大，则缓存保存开销越小，但系统意外退出时缓存丢失的风险变大。"
		},
		"label": {
			"en_US": "Cache save interval",
			"zh_CN": "缓存间隔毫秒"
		}
	}, {
		"name": "omitIfEmpty",
		"default":false, 
		"optional": true,
		"type": "bool",
		"control": "radio",
		"hint": {
			"en_US": "If the configuration item is set to true, when SELECT result is empty, then the result will not feed to sink operator.",
			"zh_CN": "如果选择结果为空，则忽略输出。"
		},
		"label": {
			"en_US": "Omit if content is empty",
			"zh_CN": "是否忽略输出"
		}
	}, {
		"name": "sendSingle",
		"default":true, 
		"optional": true,
		"type": "bool",
		"control": "radio",
		"hint": {
			"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.",
			"zh_CN": "输出消息以数组形式接收，该属性意味着是否将结果一一发送。 如果为 false，则输出消息将为{\"result\":\"${the string of received message}\"}。 例如，{\"result\":\"[{\"count\":30},\"\"count\":20}]\"}。否则，结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例，它将发送 {\"count\":30}，然后发送{\"count\":20} 到 RESTful 端点。默认为 false。"
		},
		"label": {
			"en_US": "Send single",
			"zh_CN": "将结果数据按条发送"
		}
	}, {
		"name": "dataTemplate",
		"default":"", 
		"optional": true,
		"type": "string",
		"control": "textarea",
		"hint": {
			"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.",
			"zh_CN": "Golang 模板格式字符串，用于指定输出数据格式。 模板的输入是目标消息，该消息始终是 map 数组。 如果未指定数据模板，则将数据作为原始输入。"
		},
		"label": {
			"en_US": "Data template",
			"zh_CN": "数据模版"
		}
	}]
}
