1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
2023-07-10 21:48:15 +08:00

43 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed 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.
-->
<script type="text/html" data-help-name="delay">
<p>对通过节点的消息进行延迟发送或限制</p>
<h3>输入</h3>
<dl class="message-properties">
<dt class="optional">delay <span class="property-type">数值</span></dt>
<dd>设置要应用于消息的延迟以毫秒为单位仅当节点配置为允许消息去覆盖配置的默认延迟间隔时此选项才适用</dd>
<dt class="optional">rate <span class="property-type">数值</span></dt>
<dd>设置消息之间的速率值以毫秒为单位 当该节点收到包含 <code>msg.rate</code> </dd>
<dt class="optional">reset</dt>
<dd>如果接收到的消息将此属性设置为任何值则将清空该节点保留的所有的未发送消息</dd>
<dt class="optional">flush</dt>
<dd>如果收到的消息将此属性设置为数值则将立即释放该多条消息 如果设置为任何其他类型例如布尔值则立即发送节点持有的所有未完成的消息</dd>
<dt class="optional">toFront</dt>
<dd>在速率限制模式下如果收到的消息将此属性设置为布尔值<code>true</code> <code>msg.flush=1</code> 使
</dd>
</dl>
<h3>详细</h3>
<p>当配置为延迟发送消息时延迟间隔可以是一个固定值一个范围内的随机值或为每个消息动态设置</p>
<p>当配置为对消息进行限制时它们的传递将分散在配置的时间段内状态显示队列中当前的消息数可以选择在中间消息到达时丢弃它们</p>
<p>速率限制可以应用于所有消息也可以根据<code>msg.topic</code></p>
<p>当配置为延迟消息时延迟间隔可以是固定值一定范围内的随机值或为每个消息动态设置 每条消息都会根据其到达时间独立于任何其他消息进行延迟 </p>
<p>当配置为限制消息速率时它们的传递将分布在配置的时间段内 状态显示当前队列中的消息数 它可以选择在中间消息到达时丢弃它们</p>
<p>如果设置为允许覆盖速率则新速率将立即应用并将一直有效直到再次更改重置节点或重新启动流程</p>
<p>速率限制可以应用于所有消息或根据其 <code>msg.topic</code> </p>
<p><b>注意</b>:在速率限制模式下,可以通过 <i>settings.js</i> 文件中的属性设置最大队列深度 例如<code>nodeMessageBufferMaxLength1000</code></p>
</script>