activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramdas Sawant" <replyram...@gmail.com>
Subject Re: AMQ Message Store setting
Date Mon, 28 Jul 2008 11:29:59 GMT
Hi Rob,
              I tried using the 5.2 snapshot, but still facing the same
issue. Below is my activemq.xml
///////////////////////////////////

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data">

        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="5mb"/>
                    <policyEntry topic=">" memoryLimit="1mb">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy/>
                        </dispatchPolicy>
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy/>
                        </subscriptionRecoveryPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

        <networkConnectors>
            <networkConnector name="default-nc" uri="multicast://default"/>
        </networkConnectors>

        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="2 mb"
maxReferenceFileLength="1mb"/>
        </persistenceAdapter>

        <sslContext>
            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
keyStorePassword="password"
trustStore="file:${activemq.base}/conf/broker.ts"
trustStorePassword="password"/>
        </sslContext>

        <!--  The maximum about of space the broker will use before slowing
down producers -->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="3 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="4 mb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="5 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>


        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
            <transportConnector name="ssl" uri="ssl://localhost:61617"/>
            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
            <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
        </transportConnectors>

    </broker>

    <camelContext id="camel" xmlns="
http://activemq.apache.org/camel/schema/spring">

        <package>org.foo.bar</package>

        <route>
            <from uri="activemq:example.A"/>
            <to uri="activemq:example.B"/>
        </route>
    </camelContext>

    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
        <connectors>
            <nioConnector port="8161"/>
        </connectors>

        <handlers>
            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
        </handlers>
    </jetty>

</beans>
///////////////////////////////////////////////////////

I tried setting both "maxFileLength" and "<storeUsage limit", but i am still
facing the same issue. My topic is accepting more messages and the broker is
creating more data files. It is creating datafiles of the size specified in
the "maxFileLength" attribute. Please help me out with issue. Let me know if
you neeed any more clarification. Thanks in advance.

regards
Ramdas

On 7/28/08, Ramdas Sawant <replyramdas@gmail.com> wrote:
>
> Thanks a lot Rob, will get back to you after testing, in case i need any
> help. Thanks
>
> regards
> Ramdas
>
>
>  On 7/28/08, Rob Davies <rajdavies@gmail.com> wrote:
>>
>>
>> On 28 Jul 2008, at 07:20, Ramdas Sawant wrote:
>>
>> Hi all,
>>>          I am exploring AMQ Message Store of ActiveMQ. I need to know can
>>> i limit the storage size of message store. I mean my topic should not
>>> accept
>>> messages if a certain size of stored messages is reached on disk. How can
>>> i
>>> configure this ?
>>>          The attribute maxFileLength of tag "amqPersistenceAdapter" only
>>> limits the size of one file. I am getting multiple files of the size
>>> specified by maxFileLength  attribute.  How can i limit this continuous
>>> file
>>> generation. Let me know if the question is not that clear, or need any
>>> more
>>> explaination. I am really stuck here... Thanks in advance....
>>>
>>>
>>> regards
>>> Ramdas
>>>
>>> --
>>> If you think, "you can", you can
>>> If you think, "you can't", you are right
>>>
>>
>> You can set the limit using store limit in the ActiveMQ configuration.
>> There was a bug in this that's been fixed in trunk - so use a 5.2 snapshot
>>
>>
>> cheers,
>>
>> Rob
>>
>> http://open.iona.com/products/enterprise-activemq
>> http://rajdavies.blogspot.com/
>>
>>
>>
>>
>>
>
>
> --
> If you think, "you can", you can
> If you think, "you can't", you are right
>



-- 
If you think, "you can", you can
If you think, "you can't", you are right

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message