Is there a way to write a Php consumer for SQS that doesn’t have to poll periodically for new messages?
The only way to consume messages I found so far is getting them using the receive_message() api call which needs to be done using periodical polling.
While it should work it still seems wrong.
The magic that lets SQS scale so well is that it offers very few features compared to other message passing systems. The user must: poll for messages; deal with messages getting delivered out of order; deal with messages getting delivered more than once; deal with occasional very large latency on message delivery (like 50 seconds).
It is great for certain tasks, and absolutely unusable for others. I for one spent far too long attempting to make it what it is not, and I really think Amazon should be more clear in their docs to warn you about not just what it is but also what is not. I ended up with RabbitMQ and couldn’t be happier – but yes, there is a point at which I’ll need to deal with scaling it.