简体   繁体   English

使用 JMS,有没有办法将消息存储在间歇性断开的客户端上,并在网络可用时将它们转发到代理?

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

相关问题 ActiveMQ静态网络:断开连接后如何丢弃消息? - ActiveMQ Static Network : How do I drop messages when disconnected? 当消息可用时,JMS receiveNoWait()是否保证消息传递? - Does JMS receiveNoWait() guarantee message delivery when messages are available? 如何从JMS读取和收集响应消息并使它们可用于正确的servlet线程? - How to read and collect response messages from JMS and make them available to the correct servlet thread? 存储Weblogic JMS消息以进行分析 - Store Weblogic JMS messages for analysis 使用 JMSQueueControl 暂停和恢复 JMS 消息的任何示例 - Any example of pausing and resuming JMS messages using JMSQueueControl JMS消息以可靠的方式归档 - JMS messages to file in a reliable way 如果代理不可用,则javax.jms.TemporaryTopic.delete()无限期阻塞 - javax.jms.TemporaryTopic.delete() block indefinitely if broker is not available 当代理不可用时,如何忽略 Log4j2 Kafka appender 警告消息? - How can I ignore Log4j2 Kafka appender warning messages when broker is not available? JAVA_HOME指向JRE 1.8时,无法使用activemq-admin.bat停止JMS代理 - Can not stop a JMS broker using activemq-admin.bat when the JAVA_HOME points to JRE 1.8 使用JMS向客户端显示消息 - display messages to the client using JMS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM