3

假设您有 1000 台设备一直在发送数据,那么消息队列会是收集这些数据的好工具吗?

4

2 回答 2

1

Obviously, it depends:

  • Do you need to process every set of data, regardless of how old it is?
  • Will data arive in a stead stream, or be bursty?
  • Can a single application process all the data, or will it need to be load balanced?
  • Do you have any need for the "messaging" features, such as topics?
  • If your devices would be the clients, is there a client implementation that works on them?

If you have a stream of data that can be processed by a single application, and you are tolerant of occasional lost data, I would keep it simple and post the data via REST or equivalent. I would only look to messaging once you needed either scalability, durability, fault tolerance, or the ability to level out load of time.

于 2012-04-10T02:58:35.580 回答
0

使用队列在设计方面不会出错,但正如 Chris(其他响应者)所说,在基础设施方面可能不值得你付出努力,因为 Web 服务器非常擅长处理合理的负载。

在“现实世界”中,我已经看到商业仪器将状态报告到队列中进行处理,因此它肯定是一个有效的解决方案。

于 2012-04-10T04:06:54.560 回答