简体   繁体   English

AWS PHP SDK:缓存SQS getQueueUrl

[英]AWS PHP SDK: Caching SQS getQueueUrl

I have just started using Amazon SQS . 我刚开始使用Amazon SQS

In order to make a request I must first call $sqs->GetQueueURL(...) to retreive the full URL of my queue. 为了发出请求,我必须首先调用$sqs->GetQueueURL(...)来检索我的队列的完整URL。

ie: https://sqs.ap-southeast-1.amazonaws.com/XXXXXXX/QUEUENAME 即: https//sqs.ap-southeast-1.amazonaws.com/XXXXXXX/QUEUENAME

As far as I can tell, I need to make this request every time before calling an operation on the queue (ie: ReceiveMessage or SendMessage ). 据我所知,我需要每次在调用队列上的操作之前发出此请求(即: ReceiveMessageSendMessage )。

Is there an inbuilt support for AWS PHP SDK to cache these URLs? 是否有内置支持AWS PHP SDK来缓存这些URL? Does it do it automatically? 它是自动完成的吗?

I can't seem to find any detail on what (if any) caching is happening by default. 我似乎无法找到默认情况下发生的缓存(如果有的话)的任何细节。

you do dont have to pull the queue url each time as it does not change. 你不必每次都拉队列URL,因为它不会改变。

go to sqs consule, and check all your queues. 去sqs consule,检查你所有的队列。 then copy the url you need, and use it. 然后复制你需要的网址,并使用它。

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

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