diff --git a/lib/manifest.ts b/lib/manifest.ts index 8d1dcff8..c2210eda 100644 --- a/lib/manifest.ts +++ b/lib/manifest.ts @@ -30,6 +30,7 @@ export type EventHookT = { type MQSubscription = { queue: string; batchSize?: number; + pollInterval?: number; autoAck?: boolean; }; export type MQHookT = { diff --git a/lib/plugos/hooks/mq.ts b/lib/plugos/hooks/mq.ts index d57f4875..7604c8e2 100644 --- a/lib/plugos/hooks/mq.ts +++ b/lib/plugos/hooks/mq.ts @@ -52,12 +52,13 @@ export class MQHook implements Hook { const subscriptions = functionDef.mqSubscriptions; for (const subscriptionDef of subscriptions) { const queue = subscriptionDef.queue; - // console.log("Subscribing to queue", queue); + // console.log("Subscribing to queue", queue, subscriptionDef); this.subscriptions.push( this.mq.subscribe( queue, { batchSize: subscriptionDef.batchSize, + pollInterval: subscriptionDef.pollInterval, }, async (messages: MQMessage[]) => { try {