I am using activemq 4.0.1 (I've did tests on the both 4.0.0 and 4.0.1)
and I have attached activemq.xml (basically, almost out of the box
configuration). I am using persistent queues, and I have tried with
prefetching and transactions, but that didn't really change the
behavior.

Thanks,
Igor

On 7/3/06, James Strachan <[EMAIL PROTECTED]> wrote:
On 6/30/06, Igor Bogicevic <[EMAIL PROTECTED]> wrote:
> I also forgot to answer on this thread... this was not the problem
> related to the lack of the memory, it's related to hanging
> connections, i've set up the broker with the large amount of memory
> (>2GB) in both broker configuration and via jconsole and problem was
> defintely in the connections which were not cleaned up - for unknown
> reason to me. it was easy to block queue with large number of
> un-properly closed sessions and relatively hard with properly closed
> connections in a shutdown hook.

Using what version and what quality of service? e.g. are we talking
4.0.1 and non-persistent queues? What was your XML config file?

--

James
-------
http://radio.weblogs.com/0112098/

<!-- START SNIPPET: example -->
<beans xmlns="http://activemq.org/config/1.0";>

  <!-- Allows us to use system properties as variables in this configuration file -->
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="TEST" useJmx="true">
  
    <!--  Use the following to set the broker memory limit (in bytes) -->
    <memoryManager>  
        <usageManager id="memory-manager" limit="2097152"/>
    </memoryManager>
    
    <!-- Use the following to configure how ActiveMQ is exposed in JMX
    <managementContext>
       <managementContext connectorPort="1099" jmxDomainName="org.apache.activemq"/>
    </managementContext>
    -->

    <!-- In ActiveMQ 4, you can setup destination policies -->  
    <destinationPolicy>
      <policyMap><policyEntries>
        
          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>
  
  
    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5" dataDirectory="${activemq.home}/activemq-data"/>
      <!-- To use a different datasource, use th following syntax : -->
      <!-- 
      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#postgres-ds"/>
       -->
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
    
    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default" uri="multicast://default"/>
      <!--
      <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
      -->
    </networkConnectors>
    
  </broker>
  
  <!--  This xbean configuration file supports all the standard spring xml configuration options -->
  
  <!-- Postgres DataSource Sample Setup -->
  <!-- 
  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
    <property name="serverName" value="localhost"/>
    <property name="databaseName" value="activemq"/>
    <property name="portNumber" value="0"/>
    <property name="user" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="dataSourceName" value="postgres"/>
    <property name="initialConnections" value="1"/>
    <property name="maxConnections" value="10"/>
  </bean>
  -->
  
  <!-- MySql DataSource Sample Setup -->
  <!-- 
  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
    <property name="username" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>
  -->  
   
  <!-- Embedded Derby DataSource Sample Setup -->
  <!-- 
  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>
  -->  

</beans>
<!-- END SNIPPET: example -->

Reply via email to