mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(RabbitMQ Node): Fix issue with arguments not being sent (#9397)
This commit is contained in:
parent
bf57f38d1c
commit
1c666e6e7c
|
@ -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) : {}),
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue