简体   繁体   English

从AWS上的SQS队列连续轮询

[英]Polling Continuously from a SQS queue on AWS

I have a java class that connects to an SQS queue and I would like it to respond to messages that are sent to the SQS queue. 我有一个连接到SQS队列的Java类,我希望它响应发送到SQS队列的消息。 Is that possible without running the java class continuously, sending receiveMessageRequests? 是否可以在不连续运行java类的情况下发送receiveMessageRequests来实现?

No, its not possible. 不,不可能。 SQS requires you to poll to see if there are messages waiting for you. SQS要求您轮询以查看是否有消息在等待您。

If you could uses SNS instead of SQS you could have messages pushed to you instead. 如果可以使用SNS而不是SQS,则可以将消息推送给您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM