[英]Using JMS, is there any way to store messages on intermittently disconnected clients and forward them to a broker when a network is available?
I am considering an architecture where I have clients that are intermittently connected to a network.我正在考虑一种架构,其中我的客户端间歇性地连接到网络。 I would like to store messages created on these clients in a JMS queue when the network is not available and have these forwarded to a central message broker when the clients are on the network.
当网络不可用时,我想将在这些客户端上创建的消息存储在 JMS 队列中,并在客户端在网络上时将这些消息转发到中央消息代理。 (The user has control over the network, eg dialing in, so it's not an intermittent connection like with a mobile phone.)
(用户可以控制网络,例如拨入,所以它不是像手机那样的断断续续的连接。)
Are there any JMS implementations that provide this feature?是否有任何提供此功能的 JMS 实现?
You can embed an activeMQ broker into your application您可以将 activeMQ 代理嵌入到您的应用程序中
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
Then, I suppose (did not test) that you could use ActiveMQ features which allow you to dispatch messages accross a net of brokers, using the discovery of brokers feature,然后,我想(没有测试)您可以使用 ActiveMQ 功能,这些功能允许您使用代理发现功能在代理网络中发送消息,
http://activemq.apache.org/clustering.html http://activemq.apache.org/clustering.html
or simply by adding a queue consumer server side, then dispatching through other brokers through this consumer.或者简单地通过添加队列消费者服务器端,然后通过此消费者通过其他代理进行调度。
Hope it helps.希望能帮助到你。
The Glassfish Open Message Queue can be embedded (or run stand-alone) in version 4.4 (Support the ability for a broker to run "in process" with any client.). Glassfish Open Message Queue 可以在 4.4 版中嵌入(或独立运行)(支持代理与任何客户端“在进程中”运行的能力。)。 It is very light-weight, and will support other client languages over the STOMP protocol in version 4.4 - besides Java and C.
它非常轻量级,并且将在 4.4 版中通过 STOMP 协议支持其他客户端语言 - 除了 Java 和 C 之外。 - https://mq.dev.java.net/4.4.html
- https://mq.dev.java.net/4.4.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.