We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using below service to consume my queue
import { Controller } from '@nestjs/common'; import { RabbitSubscribe, defaultNackErrorHandler, } from '@golevelup/nestjs-rabbitmq'; import { WebhookRabbitMqListener } from 'commerce-library'; import { QueueService } from './service/queue.service'; @Controller() export class QueueMessageConsumer { constructor(private readonly warehouseService: QueueService ) { } @RabbitSubscribe({ queue: 'V2webhook_queue', queueOptions: { durable: true }, errorHandler: defaultNackErrorHandler, }) async webhookV2EventsQueue({ data }: { data: WebhookRabbitMqListener }): Promise<any> { try { await this.warehouseService.processWebhookMessageQueue(data, 'V2webhook_queue') } catch (error) { console.log(error); } } }
I am getting warehouseService is undefine in
the webhookV2EventsQueue
please help me I am stuck
The text was updated successfully, but these errors were encountered:
Can you try defining the webhookv2EventsQueue as an arrow function instead? Eg:
webhookv2EventsQueue = async (data) => {}
You might be losing the proper this context which would prevent you from accessing other methods or properties on the parent class.
this
Sorry, something went wrong.
No branches or pull requests
I am using below service to consume my queue
I am getting warehouseService is undefine in
the webhookV2EventsQueue
please help me
I am stuck
The text was updated successfully, but these errors were encountered: