activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colomb <>
Subject Embedded broker, non-persistent messages and store based cursor
Date Sat, 10 Mar 2012 03:43:31 GMT
We are using an embedded broker producing non persistent messages.  The
producer is quite fast and the consumers are usually able to keep up. 
Sometimes, a consumer may slow down, and we would like to try ensure that
the producer isn't told to slow down if the broker fills up with messages. 
\ says the store based cursor
has an embedded file cursor.  Our understanding is that the broker should
queue messages in memory until it reaches the watermark (70%) and then start
queue messages in the store or temp.  Once the store has been filled, then
it should slow down the producer.  Unfortunately, we aren't seeing that
behavior.  The queue just fills up in memory until it reaches its limit and
it starts slowing / blocking the producer.  How do we get an embedded broker
to store non-persistent messages to disk when memory fills up?  Should we be
attacking this problem with a different configuration?  Our broker
configuration is below.  Thanks for the help

Active MQ 5.3.1
Java 1.6

broker = new BrokerService();
broker.setPersistent( false );
broker.addConnector( "tcp://" );

PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setQueue( ">" );
policyEntry.setProducerFlowControl( true );

PolicyMap policyMap = new PolicyMap();
policyMap.setDefaultEntry( policyEntry );
broker.setDestinationPolicy( policyMap );

SystemUsage systemUsage = broker.getSystemUsage();
systemUsage.setSendFailIfNoSpace( true );
systemUsage.getMemoryUsage().setLimit( 1024 * BYTES_IN_MEG );
systemUsage.getStoreUsage().setLimit( 1024 * BYTES_IN_MEG );
systemUsage.getTempStorage().setLimit( 1024 * BYTES_IN_MEG );

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

View raw message