mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Typo fix
This commit is contained in:
parent
880a21dc6e
commit
916b1f18c6
@ -9,7 +9,7 @@
|
|||||||
<input type="text" id="node-input-topic" placeholder="topic or queue">
|
<input type="text" id="node-input-topic" placeholder="topic or queue">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-ack" style="width: 110px;"><i class="fa fa-check"></i> Message acknowledgement</label>
|
<label for="node-input-ack" style="width: 110px;"><i class="fa fa-check"></i> Message acknowledgment</label>
|
||||||
<select type="text" id="node-input-ack" style="display: inline-block; width: 250px; vertical-align: top;">
|
<select type="text" id="node-input-ack" style="display: inline-block; width: 250px; vertical-align: top;">
|
||||||
<option value="auto">Auto</option>
|
<option value="auto">Auto</option>
|
||||||
<option value="client">Client</option>
|
<option value="client">Client</option>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-tips">
|
<div class="form-tips">
|
||||||
Enabling the ACK (acknowledgement) will set the <code>ack</code> header to <code>client</code> while subscribing to topics.
|
Enabling the ACK (acknowledgment) will set the <code>ack</code> header to <code>client</code> while subscribing to topics.
|
||||||
This means the items on the broker queue will not be dequeue'd unless an ACK message is sent using the <code>ack</code> node.
|
This means the items on the broker queue will not be dequeue'd unless an ACK message is sent using the <code>ack</code> node.
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
@ -286,7 +286,7 @@ module.exports = function(RED) {
|
|||||||
* @param { "auto" | "client" | "client-individual" } clientAck Can be `auto`, `client` or `client-individual` (the latter only starting from STOMP v1.1)
|
* @param { "auto" | "client" | "client-individual" } clientAck Can be `auto`, `client` or `client-individual` (the latter only starting from STOMP v1.1)
|
||||||
* @param { Function } callback
|
* @param { Function } callback
|
||||||
*/
|
*/
|
||||||
node.subscribe = function(queue, acknowledgement, callback) {
|
node.subscribe = function(queue, acknowledgment, callback) {
|
||||||
node.log(`Subscribing to: ${queue}`);
|
node.log(`Subscribing to: ${queue}`);
|
||||||
|
|
||||||
if (node.connected && !node.closing) {
|
if (node.connected && !node.closing) {
|
||||||
@ -297,7 +297,7 @@ module.exports = function(RED) {
|
|||||||
const headers = {
|
const headers = {
|
||||||
id: node.subscriptionIds[queue],
|
id: node.subscriptionIds[queue],
|
||||||
// Only set client-individual if not v1.0
|
// Only set client-individual if not v1.0
|
||||||
ack: acknowledgement === "client-individual" && node.options.protocolVersion === "1.0" ? "client" : acknowledgement
|
ack: acknowledgment === "client-individual" && node.options.protocolVersion === "1.0" ? "client" : acknowledgment
|
||||||
}
|
}
|
||||||
|
|
||||||
node.client.subscribe(queue, headers, function(body, responseHeaders) {
|
node.client.subscribe(queue, headers, function(body, responseHeaders) {
|
||||||
@ -343,7 +343,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Acknowledge (a) message(s) that was received from the specified queue.
|
* Acknowledge (a) message(s) that was received from the specified queue.
|
||||||
* @param {String} queue The queue/topic to send an acknowledgement for
|
* @param {String} queue The queue/topic to send an acknowledgment for
|
||||||
* @param {String} messageId ID of the message that was received from the server, which can be found in the reponse header as `message-id`
|
* @param {String} messageId ID of the message that was received from the server, which can be found in the reponse header as `message-id`
|
||||||
* @param {String} transaction Optional transaction name
|
* @param {String} transaction Optional transaction name
|
||||||
*/
|
*/
|
||||||
@ -351,7 +351,7 @@ module.exports = function(RED) {
|
|||||||
if (node.connected && !node.closing) {
|
if (node.connected && !node.closing) {
|
||||||
node.client.ack(messageId, node.subscriptionIds[queue], transaction);
|
node.client.ack(messageId, node.subscriptionIds[queue], transaction);
|
||||||
} else {
|
} else {
|
||||||
node.error("Can't send acknowledgement, not connected");
|
node.error("Can't send acknowledgment, not connected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user