activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: Are JMS Messages stored persistent out of the box?
Date Fri, 19 Jun 2009 21:41:54 GMT
On Fri, Jun 19, 2009 at 3:12 PM, pstein<pxsteiner@yahoo.ca> wrote:
>
> Assume I install ActiveMQ locally and started the server and send a JMS
> message to the ActiveMQ server.

As long as the messages sent from the client are marked persistent
(via the setDeliveryMode method on the MessageProducer), yes, messages
are persistent. This is due to the requirement by the JMS spec:

http://activemq.apache.org/what-is-the-difference-between-persistent-and-non-persistent-delivery.html

> Is this JMS message now out-of-the-box (=by default) kept persistent (e.g.
> in a textfile) until it is
> fetched from a JMS consumer?

Yes, the message is persisted. ActiveMQ 5.x uses the AMQ Message Store
as the default persistence store:

http://activemq.apache.org/amq-message-store.html

> Or do I have to tell ActiveMQ message broker explicitely before (how ?) that
> he should make
> all JMS messages (for this queue) persistent?

The default is true, but is configured here:

file:///Users/bsnyder/Downloads/jms1.1/doc/api/javax/jms/MessageProducer.html#setDeliveryMode(int)

> The messages should be hold even if I shutdown ActiveMQ and restart it later
> again.
>
> In which textfile are the JMS message hold?

When using the default configuration, the AMQ message store persists
all messages in the data directory on the filesystem.

> How/Where can I define a database (e.g. MySQL) as persistence container?

ActiveMQ can be configured to use straight JDBC or journaled JDBC
depending on the performance you need:

http://activemq.apache.org/persistence.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Mime
View raw message