import {bind, BindingSpec, ContextTags} from '@loopback/core'; import { asBullQueueConsumer, QueueConsumerOptions } from '../types'; export function bullQueueConsumer( options: QueueConsumerOptions, ...specs: BindingSpec[] ) { specs = [ ...specs, { tags: { [ContextTags.KEY]: `queue.consumer.${options.name}` } }] return bind(asBullQueueConsumer(options), ...specs); }