Using JMS, is there any way to store messages on i

2019-05-28 20:06发布

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. (The user has control over the network, e.g. dialing in, so it's not an intermittent connection like with a mobile phone.)

Are there any JMS implementations that provide this feature?

2条回答
我命由我不由天
2楼-- · 2019-05-28 20:31

You can embed an activeMQ broker into your application

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,

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.

查看更多
三岁会撩人
3楼-- · 2019-05-28 20:32

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.). It is very light-weight, and will support other client languages over the STOMP protocol in version 4.4 - besides Java and C. - https://mq.dev.java.net/4.4.html

查看更多
登录 后发表回答