ericblade/mws-advanced

allow for push notifications in requestAndDownloadReport

ericblade opened this issue · 1 comments

Per #111 @pwrnrd mentioned

Btw, if your looking at reporting, what might be very nice to implement is this:
https://docs.developer.amazonservices.com/en_US/notifications/Notifications_ReportProcessingFinishedNotification.html .

it looks like we could implement a SQS queue destination as a parameter, then we can watch that instead of polling.

perhaps making a separate package that implements more complex things like that is better than having it inside the main package, especially since going to SQS would add a dependency to the AWS libraries.

I'm not sure whether that would solve the issue. You could still fire 'x' RequestReport-requests simultaneously and hit queue limits. The same holds for GetReport-requests. Nonetheless, I think it is an elegant solution to retrieve the requestedReportIDs.

Edit: Perhaps we should change this issue to a feature request for the Subscriptions API? That would make sense to implement in this package. Then the people are free to choose (or write their own) SQS consumer. In that case we don't have to implement a dependency on the asws-sdk.

PS. This week, I actually created a consumer based on https://github.com/bbc/sqs-consumer . I found that the package was not maintained that well in recent months so I created my own version and updated the tests + added a pollingTimeout. If you want, I can put in some more work into that, polish it, and document how people would be able to use that in combination with MWS-Advanced.