简体   繁体   English

Spring XD 可以用作通知的消息代理吗?

[英]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.

相关问题 Spring作为Broker Relay使用外部Message Broker - Spring as Broker Relay by using an external Message Broker 一个模块中的Spring XD转换和路由消息 - Spring XD transform and route message in one module 我可以在没有 Message Broker 的情况下使用 Spring Integration 吗 - Can I use Spring Integration without Message Broker 在Spring 4中创建websocket消息代理的多个实例 - Creating multiple instances of websocket message broker in Spring 4 Spring Web 套接字消息代理未通过测试 - Spring web socket message broker failing tests spring websockets:向离线用户发送消息 - 消息未在消息代理中排队 - spring websockets: sending a message to an offline user - messages not enqueued in message broker 可以将Spring XD配置为具有Flume的文件通道功能吗? - Can Spring XD be configured to have the File Channel functionality of Flume? Spring XD处理器可以拆分有效负载并将其发送到接收器模块吗? - Can Spring XD processor split payload and send them to a sink module? 在集群环境中使用外部消息代理(RabbitMQ)将Spring套接字转换并发送给用户 - spring socket convertandsendtouser with external message broker(RabbitMQ) in cluster environment 如何为spring Message Broker的clientOutboundChannel配置1个线程限制? - How to configure 1 thread limit for the clientOutboundChannel of spring Message Broker?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM