activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Wen Tong <>
Subject configuration question
Date Sun, 16 Sep 2012 16:55:02 GMT

Hi Everyone,

Greetings! This forum is very helpful, and i was able to come up with a
solution for my use case.  I just want to confirm if my configurations are

My requirements are simple. I  have 4 queues, and they are named:
1) incoming - I have a web service that post messages to this queue. This
queue gets big.
2) incoming.error - This queue holds the error of incoming. If the listener
received error from consumer, it moves the message to this queue, for
3) outgoing - I have a web service that post message to this queue, and this
can also grow big.
4) outgoing.error - This queue holds the error for outgoing.(same idea as
the incoming.error)

The reason why I have a separate error queue, is for reprocessing. If I need
to reprocess failed messages, all i have to do, is to move the messages from
the error queue to the real queue. (e.g. move message from incoming.error to
incoming ).

The messages need to be persistent for recovery, and I have used kahaDB for
fast storage.

I am using activeMQ 5.5.1 (Is the latest version 5.6.0 have a lot of bug
fixes and performance enhancement, that I really need to upgrade? )

First I set the JVM to be 2G.

# Set jvm memory configuration



1) Since I am using persistent message, I dont need to define the
memoryUsage. (True or False? )
2) Since I have a drive that is 50G in size, it is better to explicitly
define it in storeUsage (True or False?)
3) I have to define the tempUsage as 20% of my storeUsage. In my
understanding the tempUsage is use when i am about to run out of
memory.(more like paging it to disk, from memory )

                    <storeUsage limit="50 gb"/>
                    <tempUsage limit="13 gb"/>

I predefined the queue in the config, to be created during start up.

            <queue physicalName="incoming" />
            <queue physicalName="incoming.error" />
            <queue physicalName="outgoing" />
            <queue physicalName="outgoing.error" />

destination configs:


                <policyEntry topic=">" producerFlowControl="true"
                      <vmCursor />

                <policyEntry queue="incoming" advisoryWhenFull="true" 
producerFlowControl="false"   >
                     <individualDeadLetterStrategy  queuePrefix="dlq."
processNonPersistent="true" useQueueForQueueMessages="true" />

                <policyEntry queue="outgoing" advisoryWhenFull="true" 
producerFlowControl="false"   >
                     <individualDeadLetterStrategy  queuePrefix="dlq."
processNonPersistent="true" useQueueForQueueMessages="true" />


1) Since I expect heavy load on the "incoming" and "outgoing" queue, I set
the producerFlowControl to false (so that my producer is not block, when
consumer is slow. I believe 50G space is adequate). I also did not specify
memory limit, because i am using persistent message.

2) I added advisoryWhenFull=true, so that I can be notified space is about
to run out. I have to subscribe to the topic, "ActiveMQ.Advisory.FULL" to
get the notifications. Or maybe via JMX?

3) I added individual dead letter queue, even though I don't use it, because
I have a dedicated queue (incoming.error and outgoing.error for specific
error) for errors. But If for any reason, it will throw an error, I have it
isolated per queue.

4) I added a vmQueueCursor, for fast processing. (Since my consumer have a
potential to slow down or become unavailable - unlikely to happen but it can
happen,  is using a file based cursor better? )

5) I did not add configuration for "incoming.error" and "outgoing.error"
queue, since they don't have any consumer. They are only there to hold the
error for reprocessing.

Any help will be greatly appreciated!

Thanks in advance,

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message