mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 18:41:48 -08:00
move to create_container on rhea
This commit is contained in:
parent
ca8aed39dd
commit
a4d45e4eda
|
@ -1,4 +1,5 @@
|
|||
import { ContainerOptions, Delivery, Dictionary, EventContext } from 'rhea';
|
||||
import { ContainerOptions, Dictionary, EventContext } from 'rhea';
|
||||
import rhea = require('rhea');
|
||||
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
import {
|
||||
|
@ -114,7 +115,7 @@ export class Amqp implements INodeType {
|
|||
throw new Error('Queue or Topic required!');
|
||||
}
|
||||
|
||||
const container = require('rhea');
|
||||
const container = rhea.create_container();
|
||||
|
||||
/*
|
||||
Values are documentet here: https://github.com/amqp/rhea#container
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Container, ContainerOptions, EventContext, Message, ReceiverOptions } from 'rhea';
|
||||
import { ContainerOptions, EventContext, Message, ReceiverOptions } from 'rhea';
|
||||
import rhea = require("rhea");
|
||||
|
||||
import { ITriggerFunctions } from 'n8n-core';
|
||||
import {
|
||||
|
@ -163,8 +164,7 @@ export class AmqpTrigger implements INodeType {
|
|||
durable = true;
|
||||
}
|
||||
|
||||
const container: Container = require('rhea');
|
||||
|
||||
const container = rhea.create_container();
|
||||
|
||||
let lastMsgId: string| number | Buffer | undefined = undefined;
|
||||
const self = this;
|
||||
|
@ -179,7 +179,6 @@ export class AmqpTrigger implements INodeType {
|
|||
if(!context.message)
|
||||
return;
|
||||
|
||||
console.log("New Message on Amqp Trigger from " + container.id + " context conteaineer id: " + context.container.id);
|
||||
// ignore duplicate message check, don't think it's necessary, but it was in the rhea-lib example code
|
||||
if (context.message.message_id && context.message.message_id === lastMsgId) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue