在 Spring-Websocket 中使用专用的 STOMP 代理比使用简单的内存代理有什么好处?

What's the benefit of using dedicated STOMP broker over the simple in-memory broker in Spring-Websocket?

我是 Spring-Websocket 的新手,在文档和几乎所有教程中都说可以使用简单的内存中代理或者专用的 STOMP 代理,如 RabbitMQ 或 ActiveMQ。

我的主要目标是通过向我的项目添加专用的 STOMP 代理来避免不必要的工作,即使我不需要它。

所以,我的问题是使用专门的 STOMP 经纪人有什么好处?我什么时候需要专门的 STOMP 经纪人?

我不想知道 this post and I also don't want to know if I need a stomp broker like in this post 中专门的 STOMP 经纪人的优缺点。

有很多东西可以让您在 STOMP 代理和简单的内存代理之间进行选择。

  1. 可扩展性 - STOMP 代理允许多个生产者和消费者,因此允许扩展,而 Web Socket In 内存代理仅限于它们在 运行 中的实例。
  2. 容错 - STOMP 代理是持久的,并且可以允许重试 Web Socket In memory 代理 "In Memory"。在失败期间,消息将永远消失。
  3. 监控 - STOMP 代理很容易监控,而内存中的 Web Socket 代理则不是那么多。

因此您需要确定您正在构建的应用程序的范围,以便在 STOMP 代理和内存 Web 套接字代理之间做出决定。