On Jan 30, 2008, at 12:56 PM, brian12 wrote:
I have a need to log all messages to all topics that pass through a
particular broker for offline analysis. I can write a client that
subscribes to all the topics, and dumps the data to disk. However,
I'd
rather use something that's built-in to ActiveMQ if it's available.
I was
looking at the AMQ Message Store, and it seems to have an archive
option. I
tried setting it up, and see files being generated in the journal
directory
and kr-store directory, but nothing gets dumped into the archive
directory.
So, my first question is, will the AMQ Message Store allow me to
essentially
log every JMS message that comes through the broker? And, are the
files in
a format that is easily readable?
If so, any ideas why the data wouldn't be written to the archive?
Here's
the relevant XML in my configuration.
<persistenceAdapter>
<amqPersistenceAdapter directory="${activemq.base}/activemq-
data"
maxFileLength="1mb" archiveDataLogs="true"/>
</persistenceAdapter>
I've tried other properties for the AMQ message store, but still no
files
are ever written to the activemq-data/archive directory.
Thanks!
- Brian
--
View this message in context:
http://www.nabble.com/Data-logging-with-AMQ-message-store--tp15181530s2354p15181530.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Hi Brian,
the AMQ message store uses a journal which is a series of data files
- for your configuration the max length will be 1mb. When these files
are no longer needed (have no messages,acks transactions etc that are
in use) they are usually deleted.
The archive option means these files are moved to the archive
directory instead of being deleted. All the journal files are probably
still in use - and this doesn't sound like what you need anyway.
I'd look at Apache Camel (which can be embedded in the broker) - the
walk through example - http://activemq.apache.org/camel/walk-through-an-example.html
shows how to listen to messages on a queue and archive them to a
directory
cheers,
Rob
http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/