Hi Folks,
    I'm hoping this is an easy one to answer for some of you.

    Been using AMQ 4.1.1 for a couple of months now, and only just noticed
that messages on topics with durable subscriptions were not being persisted
across restarts, which seems like a bit of problem :confused:. At a high
level, here are the steps I follow: 

- Disable all consumers
- Put a few messages on topic
- Verify topic size is non zero using JMX
- Restart AMQ
- Notice topic size is zero again.

    The message producer definitely sets the
javax.jms.DeliveryMode#PERSISTENT flag (we use Spring's JmsTemplate), and
the broker is configured as follows : 

<broker useJmx="true" xmlns="http://activemq.org/config/1.0";
brokerName="localhost"
    dataDirectory="${activemq.home}/activemq-data/"
  >

 [[SNIP]]

   <persistenceAdapter>
      <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.home}/activemq-data/journaledJDBC"/>
    </persistenceAdapter>

 [[SNIP]]

</broker>

I've also tried several combinations of the following :
- AMQ Versions 4.1.1, 4.1.2 & 5.0.0
- PersistenceAdapter kaha & journaledJDBC for the 4.1.x and
amqPersistenceAdapter for 5.0.0
- Within the journaledJDBC, 2 different data sources, mysql & derby
embedded. 
- Set  persistent="true" on the <broker>

What am I missing? I've spent the better part of today scouring the internet
for leads, and reading through documentation with little success. If someone
could right this ship, I'd really appreciate it.

I guess more specifically, the questions I've been unable to answer:
- Is AMQ capable of preserving messages across restarts?
- Is AMQ capable of preserving messages across restarts using an embedded
derby instance?
- And the golden ticket : does anybody have configuration they can share to
make it so ? :-D

Regards,
Deepak.

-- 
View this message in context: 
http://www.nabble.com/Persisting-messages-across-restarts-%28AMQ-4.1.1---4.1.2%29-tp16827035s2354p16827035.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to