是否有某种服务可以排队api调用? [英] Is there some kind of service to queue api calls?

查看:153
本文介绍了是否有某种服务可以排队api调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当客户在我的网站上填写表格时,我需要调用desk.com api来创建案例.但是,有时API会因维护而关闭(经常!),我的调用将失败.

I need to call the desk.com api to create cases when a customer completes a form on my site. However sometimes the API is down for maintenance (too often!) and my call will fail.

目前,我只是将详细信息写入登录错误,然后向自己发送电子邮件.然后,我手动创建案例.

Presently I just write the details to a log on error and send myself an email. Then I create the case manually.

因此,我正在考虑编写某种消息队列,因此可以将请求放入队列中,然后让某些进程处理该队列并进行api调用,而不是在进程内调用api.这样,如果api调用失败,则该过程将在下一个计划的时间间隔内再次尝试.

So I'm thinking to write some kind of message queue so instead of calling the api in-process, I can put the request in queue, then have some process work the queue and make the api calls. they way if the api call fails the process will just try again next scheduled interval.

由于世界上有太多的Web API,所以我确定其他人肯定也遇到同样的问题.那么,是否有一些第三方解决方案可以有效地完成我想做的事情?或一些开源项目或一些可以解决此问题的东西?

Since there are so many web APIs in the world, I figure surely other people must be having the same problem. So are there some third-party solutions which effectively do what I'm trying to do? or some open-source project or something to deal with this issue?

干杯!

推荐答案

Amazon Simple Queue Service(SQS)是一种快速,可靠,可扩展的,完全托管的队列服务. SQS使解耦云应用程序的组件变得简单且具有成本效益.您可以使用SQS以任何级别的吞吐量传输任何数量的数据,而不会丢失消息或要求其他服务始终可用.

Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed queue service. SQS makes it simple and cost-effective to decouple the components of a cloud application. You can use SQS to transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be always available.

http://aws.amazon.com/sqs/

这篇关于是否有某种服务可以排队api调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆