rahulrkr08 / loopback4-sqs-consumer

This is a loopback-next extension for consuming events from AWS SQS Queue. This extension is using sqs-consumer for polling messages from SQS Queue, so please check for more about configurations and usages.
MIT License
3 stars 1 forks source link

How to use provider in Loopback4? #7

Open toygame opened 2 years ago

toygame commented 2 years ago

Hi sir, I'm a Loopback newbie. I install and create a provider already. How to use this provider on My Loopback 4 Application like @inject to my controller ?.

Thank. Toy

oleksii-dmytrenko commented 1 year ago

@toygame or anybody struggling with the integration, I ended up adding the following line to application.ts:

    this.bind(SqsConsumerBindings.SQS_CONSUMER_NAMESPACE).toInjectable(SqsQueueSubscriberProvider); // SqsQueueSubscriberProvider is my provider class