Did you try enabling persistence in ActiveMQ? Which version of ActiveMQ do you use? I looked in to ActiveMQ 5.8 and it uses KahaDB which is a file based DB as the default persistence configuration. The persistence approach can be changed based on you requirement.
To enable persistance;
1) Go to file [ActiveMQ_HOME] --> conf --> activemq.xml
2) Check if below configurations are enabled for broker;
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" persistent="true" dataDirectory="${activemq.data}">
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
- Within broker tag, attribute set to persistent="true".
- configurations are pointing to KahaDB.
The default KahaDB files can be found under the below location;
[ActiveMQ_HOME]/data/kahadb/
Check if this satisfies your requirement. For more information, please refer ActiveMQ Persistence. The latter part contains KahaDB persistence configurations.
BTW in ActiveMQ console, what is refered to as "Messages Enqueued" is the count since last reset. This will set to 0 whenever you restart the server. The actual available message count is shown by the count under "Number Of Pending Messages".
I haven't tried this with WSO2 MB. Will try it sometime and keep you posted.