Results 1 to 2 of 2

Thread: NMS memory leaks

  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Default NMS memory leaks

    I write simple nms listener with failover. Then I start my app without AciteMQ started, my app start to create failover threads. And do it until I start ActiveMQ.
    My Spring config:

    Code:
      <object id="connectionFactory" type="Spring.Messaging.Nms.Connections.CachingConnectionFactory, Spring.Messaging.Nms">
        <property name="SessionCacheSize" value="10" />
        <property name="TargetConnectionFactory">
          <object type="Apache.NMS.ActiveMQ.ConnectionFactory, Apache.NMS.ActiveMQ">
            <constructor-arg index="0" value="activemq:failover:(tcp://localhost:61616)?transport.timeout=1000&amp;transport.startupMaxReconnectAttempts=1"/>
          </object>
        </property>
      </object>
    
      <object name="nmsTemplate" type="Spring.Messaging.Nms.Core.NmsTemplate, Spring.Messaging.Nms">
        <property name="ConnectionFactory" ref="connectionFactory"/>
        <property name="DefaultDestinationName" value="foo.bar"/>
      </object>
    
      <object id="controller" type="Consumer.Controller, Consumer" init-method="Init">
        <constructor-arg ref="nmsTemplate" />
      </object>
    Listener creation:


    Code:
            public void Init()
            {
                SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
                container.ConcurrentConsumers = 10;
                container.ConnectionFactory = NmsOperations.ConnectionFactory;
                container.DestinationName = "foo.bar";
                container.MessageListener = new MessageListener(this, NmsOperations);
                try
                {
                    container.AfterPropertiesSet();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
            }

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    Issue logged as https://jira.springsource.org/browse/SPRNET-1500.

    Thanks for the report,
    -Steve B.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •