diff --git a/lib/sqs.service.ts b/lib/sqs.service.ts index 03c411b..6701c94 100644 --- a/lib/sqs.service.ts +++ b/lib/sqs.service.ts @@ -99,7 +99,7 @@ export class SqsService implements OnModuleInit, OnModuleDestroy { throw new Error(`Consumer/Producer does not exist: ${name}`); } - const { sqs, queueUrl } = (this.consumers.get(name) ?? this.producers.get(name)) as { + const { sqs, queueUrl } = (this.consumers.get(name).instance ?? this.producers.get(name)) as { sqs: SQSClient; queueUrl: string; };