🐛 Fix issue that RabbitMQ Trigger node did reuse same item

This commit is contained in:
Jan Oberhauser 2021-04-08 23:34:10 +02:00
parent 06407a9afe
commit 3c48b06884

View file

@ -107,15 +107,15 @@ export class RabbitMQTrigger implements INodeType {
const self = this; const self = this;
const item: INodeExecutionData = {
json: {},
};
const startConsumer = async () => { const startConsumer = async () => {
await channel.consume(queue, async (message: IDataObject) => { await channel.consume(queue, async (message: IDataObject) => {
if (message !== null) { if (message !== null) {
let content: IDataObject | string = message!.content!.toString(); let content: IDataObject | string = message!.content!.toString();
const item: INodeExecutionData = {
json: {},
};
if (options.contentIsBinary === true) { if (options.contentIsBinary === true) {
item.binary = { item.binary = {
data: await this.helpers.prepareBinaryData(message.content), data: await this.helpers.prepareBinaryData(message.content),