Closed allanclempe closed 1 year ago
quick update: Azure storage queue doesn't support long polling, so I had to take that off from the default configuration
People still can use tho, by passing manually to a new prop called receiveOptions
which will be injected as additional param. This is how I would setup SQS consumer.
const provider = new AwsQueueProvider("http://queue.url");
Consumer.create(provider, {
pollingWaitTimeMs: 0,
receiveOptions: {
// enabling long pooling for AWS
WaitTimeSeconds: 30,
},
handleMessage: message => {},
});
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I don't think we have any plans to support other providers, but thanks for the contribution!
The problem This library is limited to AWS SQS service whereas other providers are out there. The idea is to expand it to be used for any queue service provider, starting with Storage Queue Service (Azure).
Suggested solution Abstract queue methods and create different implementation for each provider (AWS and Azure) preserving the core functionality.
That way, any impl to IQueueProvider could be passed in to sqs-consumer.
Additional context I have done some work already and have it fully working for Azure. If you guys are interested to have this feature in place, I'm keen to work a bit more on docs and tests (got 70% coverage so far)
Let me know your thoughts.
Thanks