activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Embedded broker, non-persistent messages and store based cursor
Date Sat, 10 Mar 2012 13:28:32 GMT
Unfortunately - when you disable persistence in the broker, it also prevents any use of storage
to disk. I suggest you don't set persistence to false and make sure the messages you send
are non-persistent. You should then get the behaviour you want.

On 10 Mar 2012, at 03:43, colomb wrote:

> 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. 
> \http://activemq.apache.org/message-cursors.html 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://0.0.0.0:61616" );
> 
> 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: http://activemq.2283324.n4.nabble.com/Embedded-broker-non-persistent-messages-and-store-based-cursor-tp4461429p4461429.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message