views:

195

answers:

2

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?

+1  A: 

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.

Laurent K
Might also want to make that queue persistent.
Robin
Interesting! I have been evaluating ActiveMQ as a JMS provider. Is there any way to programatically control whether or not the embedded broker is attempting to send messages? I would like to disable the broker if the client is not ready to send messages.
Ken Liu
A: 

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

mjustin