Thursday, 15 July 2010

persistence - ActiveMQ - Memory limit reached for topic (Mirror Queue) -



persistence - ActiveMQ - Memory limit reached for topic (Mirror Queue) -

we using activemq 5.6 next configuration: - flow command on - memory limit topics 1mb - mirror queues enabled (no explicit virtual topics defined)

there persistent messages beingness sent queue queuea. obviously, message copied mirror.queuea non persistent , automatically created topic.

on topic, there no consumers. if there consumers 1 time in while, non-durable subscribers.

after while, producer blocks , next error:

usage manager memory limit reached topic://mirror.queuea

according various sources including activemq documentation, there messages in topic without durable subscribers dropped want , had expected. not case.

there one related stackoverflow question accepted solution suggests using flow command disabling disk-spooling:

that not utilize disk, , block producers when memorylimit hit.

but not want block producers because block indefinitely because there no consumer coming. why these messages beingness persisted?

i see few options: - bug , fixed in later amq versions - configuration issue (of don't know how resolve it) - there alternative drop oldest message when memory limit nail (i couldn't find such option)

i hope can help!

thanks,

//j

[update]

although have deployed versions of 5.6 out in field, running same endurance/load test on 5.8 installation of amq same configuration. right now, have transmitted 10 times messages on 5.6 scheme without issues. allow test run on night or next days see if there other limit.

ok,

as stated in update before, running same laod test on 5.8 installation of activemq same configuration cause storage exceedance.

this happening after approximately sending 450 transactions 3 queues topic memory limit of 1mb. watch size of kahadb database file growing.

with amq 5.8, stopped load test after 4 days resulting in 280.000 transactions sent. no storage issues, no stuck producer , kahadb file stayed approximately same size time.

so, although cannot sure bug in activemq 5.6, 5.8 behaving differently , expected , documented. not storing message in mirrored queues persistently when no subscriber registered.

for existing installations of amq 5.6, used little hack avoid changing application code.

since application consuming topics prefixed "mirror." (the default prefix) , wildcards, defined topic @ start-up in configuration using <destinations> xml tag. wildcards used used hardcoded name all-device. unfortunately required next step: we defined <compositequeue> within <destinationinterceptors> section of config routed copies of messages (<forwardto>) actual (mirrored) queue 1 topic. topic needs defined in advance or beingness created manually since defining compositequeue not create topic. plus, cannot utilize then removed mirrored queue feature config

to sum up, looks bit this:

<destinations> <topic name="mirror.queuea.all-devices" physicalname="mirror.all-devices" /> </destinations> <destinationinterceptors> <virtualdestinationinterceptor> <virtualdestinations> <compositequeue name="queuea.*" forwardonly="false"> <forwardto> <topic physicalname="mirror.queuea.all-devices" /> </forwardto> </compositequeue> </virtualdestinations> </virtualdestinationinterceptor> </destinationinterceptors>

hope helps. "hack" may not possible in every situation since never consumed on individual mirror topics, possible.

memory persistence activemq jms-topic flooding

No comments:

Post a Comment