mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(RabbitMQ Node): Fix issue with arguments not being sent (#9397)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||||
import * as amqplib from 'amqplib';
|
import * as amqplib from 'amqplib';
|
||||||
|
import type { Options } from 'amqplib';
|
||||||
import type {
|
import type {
|
||||||
IExecuteFunctions,
|
IExecuteFunctions,
|
||||||
ICredentialsDecrypted,
|
ICredentialsDecrypted,
|
||||||
@@ -265,7 +266,8 @@ export class RabbitMQ implements INodeType {
|
|||||||
displayName: 'Arguments',
|
displayName: 'Arguments',
|
||||||
name: 'arguments',
|
name: 'arguments',
|
||||||
placeholder: 'Add Argument',
|
placeholder: 'Add Argument',
|
||||||
description: 'Arguments to add',
|
description:
|
||||||
|
'Arguments to add, See <a href="https://amqp-node.github.io/amqplib/channel_api.html#channel_publish" target="_blank">here</a> for valid options',
|
||||||
type: 'fixedCollection',
|
type: 'fixedCollection',
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
multipleValues: true,
|
multipleValues: true,
|
||||||
@@ -451,7 +453,13 @@ export class RabbitMQ implements INodeType {
|
|||||||
);
|
);
|
||||||
headers = additionalHeaders;
|
headers = additionalHeaders;
|
||||||
}
|
}
|
||||||
queuePromises.push(channel.sendToQueue(queue, Buffer.from(message), { headers }));
|
|
||||||
|
queuePromises.push(
|
||||||
|
channel.sendToQueue(queue, Buffer.from(message), {
|
||||||
|
headers,
|
||||||
|
...(options.arguments ? (options.arguments as Options.Publish) : {}),
|
||||||
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@@ -519,7 +527,10 @@ export class RabbitMQ implements INodeType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exchangePromises.push(
|
exchangePromises.push(
|
||||||
channel.publish(exchange, routingKey, Buffer.from(message), { headers }),
|
channel.publish(exchange, routingKey, Buffer.from(message), {
|
||||||
|
headers,
|
||||||
|
...(options.arguments ? (options.arguments as Options.Publish) : {}),
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user