[英]Can Spring XD be used as a message broker for notifications?
I have to implement a notification system within a Java Spring app with angular for a front end.我必须在 Java Spring 应用程序中实现一个带有前端角度的通知系统。 I was advised on using Spring XD as the message broker.有人建议我使用 Spring XD 作为消息代理。 However after looking at it, I am unsure if this would be a good strategy.然而,在看过之后,我不确定这是否是一个好策略。 It might be possible but will look like a hack.这可能是可能的,但看起来像一个黑客。
EDIT: I have a simple use-case.编辑:我有一个简单的用例。 On the web app if user A does an action X, then I need to notify user B about action X using notifications in the web app (if the user B is currently logged in), through GCM and through SMS.在 Web 应用程序上,如果用户 A 执行操作 X,那么我需要使用 Web 应用程序中的通知(如果用户 B 当前已登录)、通过 GCM 和 SMS 通知用户 B 有关操作 X。
AFAIK, Spring XD is a framework which allows us to communicate with several different Message Broker (among other things that it does). AFAIK,Spring XD 是一个框架,它允许我们与几个不同的 Message Broker 进行通信(以及它所做的其他事情)。 So, Spring XD itself cannot act as a MB Server.因此,Spring XD 本身不能充当 MB 服务器。 As a MB server, you have several options like ActiveMQ, RabbitMQ, Kafka....作为 MB 服务器,您有多种选择,例如 ActiveMQ、RabbitMQ、Kafka....
If you are planning to build a message oriented system from ground up, then Spring XD could be a good choice.如果您打算从头开始构建一个面向消息的系统,那么 Spring XD 可能是一个不错的选择。 If you are just looking for adding a new feature in existing application, you can achieve communication to any of the above MQ servers using Spring Integration (recommend you check Spring Integration Java DSL).如果您只是想在现有应用程序中添加新功能,您可以使用 Spring Integration 实现与上述任何 MQ 服务器的通信(建议您查看 Spring Integration Java DSL)。 This way you will be easily integrate it with existing application.这样您就可以轻松地将其与现有应用程序集成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.