在开发过程中模拟 Amazon SQS

发布于 2024-08-22 13:17:16 字数 253 浏览 8 评论 0原文

我对使用 Amazon SQS 开始一些开发非常感兴趣,也许还有 SimpleDB,我的问题是,是否有任何开源解决方案可以模仿功能,仅用于开发目的。我已经遇到过用于创建 EC 式的 Eucalyptus 项目 (http://open.eucalyptus.com)云。

我在谷歌上没有取得任何成功,我怀疑这是因为进入成本太便宜了,但是,有人知道这样的事情吗?

I'm quite interested in beginning some development using Amazon SQS, perhaps SimpleDB too, my question is this, are there any open source solutions that mimic the functionality, just for the purposes of development. I've already encountered the Eucalyptus project (http://open.eucalyptus.com) for creating an EC-esque cloud.

I've not had any success with google, I suspect it's because the cost of entry is so inexpensive, but still, does anyone know of anything like this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

只涨不跌 2024-08-29 13:17:16

对于 SQS,我编写了 ElasticMQ,您可以嵌入式运行(它是用 Scala 编写的,因此在 JVM 上运行)或独立运行。它具有持久模式和内存模式,第一种适合开发,第二种适合测试。

For SQS I wrote ElasticMQ, which you can run either embedded (it's written in Scala, so runs on the JVM) or stand-alone. It has both persistent and in-memory modes, the first being good for dev, second for testing.

云醉月微眠 2024-08-29 13:17:16

如果您需要的测试替身不仅仅用于 SQS,您可以尝试 LocalStack

为了模拟 SQS,它在内部使用 adamw 提到的 ElasticMQ。

例如,您可以通过 Docker 启动 LocalStack,它将启动以下服务:

If you need a test double for more than just SQS, you can try LocalStack.

To simulate SQS, it internally uses ElasticMQ mentioned by adamw.

You can start LocalStack via Docker, for example, and it will start the following services:

白色秋天 2024-08-29 13:17:16

一些 Amazon SDK 具有“模拟”模式,即:

模拟服务是另一种方式
使用示例代码。服务
不调用AWS,而是返回
您可以修改为的设定响应
满足您的需求(XML响应
文件位于 Mock 目录中)。这
模拟服务让您轻松
测试你的应用程序如何处理
不同的反应。

对于 SQS,Perl 和 PHP SDK 似乎具有模拟模式。我知道Amazon RDS的.NET SDK也有模拟模式。

Java SDK 不包含模拟实现:

客户端模拟实现已被删除。相反,开发商
鼓励使用更灵活、功能更齐全的模拟库,
例如 EasyMock jMock

如果您要使用的 SDK 没有可用的模拟模式,您可能可以创建自己的类似类型的东西,它返回预配置的响应,而不是实际启动服务。

请参阅此处了解更多信息

Some of the Amazon SDKs have "mock" mode, which is:

The mock service is an alternate way
to use the sample code. The service
doesn't call AWS, but instead returns
a set response that you can modify to
suit your needs (the XML response
files are in the Mock directory). The
mock service makes it easy for you to
test how your application handles
different responses.

For SQS, it appears the Perl and PHP SDKs have mock mode. I know that the .NET SDK for Amazon RDS also has the mock mode.

The Java SDK doesn't contain mock implementations:

The client mock implementations have been removed. Instead, developers
are encouraged to use more flexible and full featured mock libraries,
such as EasyMock, jMock

If the SDK you will be using doesn't have the mock mode available, you could probably create your own similar type of thing which returns the preconfigured responses instead of actually hitting up the service.

See here for more info

北凤男飞 2024-08-29 13:17:16

GoAws - https://github.com/p4tin/goaws - 刚刚作为测试版发布。 (免责声明 - 我是开发商)。

GoAws - https://github.com/p4tin/goaws - was just released as beta. (disclaimer - I am the developer).

从此见与不见 2024-08-29 13:17:16

关于Java SDK,它不再包含模拟实现:

客户端模拟实现已被删除。相反,开发商
鼓励使用更灵活、功能更齐全的模拟库,
例如 EasyMock jMock

Regarding the Java SDK, it does no longer contain mock implementations:

The client mock implementations have been removed. Instead, developers
are encouraged to use more flexible and full featured mock libraries,
such as EasyMock, jMock

懒猫 2024-08-29 13:17:16

如果您使用 .NET 或 Mono,您可以尝试 Stratosphere。它具有模仿 SimpleDB、SQS 和 S3 的本地实现。对于 SimpleDB 模拟实现,它使用 SQLite,对于 SQS 和 S3,它在文件系统中存储消息/对象。

If you are in .NET or Mono you can try Stratosphere. It has local implementations that mimic SimpleDB, SQS and S3. For SimpleDB mock implementation it uses SQLite, for SQS and S3 it stores messages/objects in file system.

似狗非友 2024-08-29 13:17:16

如果您需要模拟 SNS 以及 SQS,您可以查看:Yopa

if you need to simulate SNS as well as SQS you can check out: Yopa

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文