Announcement Announcement Module
Collapse
No announcement yet.
Spring-AMQPStops W/O Reason Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring-AMQPStops W/O Reason

    I have a spring-amqp app that runs in glassfish.

    When it starts up (assuming that the glassfish instance is started first), it runs fine. But after a few minutes (normally 10-20) it simpy stops executing. Connections to rabbit persist, but it stops attempting to pull any messages.

    Messages still exist on the queue ready to be pulled but spring-amqp doesn't seem to even attempt to pull them.

    I don't see any errors in either the application or server logs that would explain one of the consumer thread dying. In fact, the rabbit management console still shows the consumer connections as active. They just stop receiving.

    Any ideas?

  • #2
    I have got the same issue. Once all the concurrent consumers have consumed there 1st message it stops receiving messages. I see the messages on the queues and i am constantly publishing them to the exchange.

    I when i have 5 concurrent consumers i can see 5 messages consumed and it stops then. When i increase my concurrent consumers to 10 it consumes 10 messages and stops receiving any more messages.

    I see the threads are waiting for new messages but non is getting pulled from the queue. I have a standard configuration as follows.

    Code:
    	<bean id="accountMsgListenerContainer" class="org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer">
    		<property name="connectionFactory" ref="connectionFactory" />
    		<property name="queueName" value="#{account.name}" />
    	    <property name="concurrentConsumers" value="5" />
    	    <property name="messageListener" ref="accountMsgListenerAdapter" />
    	    <property name="autoAck" value="true"/>
    	    <property name="errorHandler" ref="errorHandler" />
    	</bean>
    
    	<bean id="accountMsgListenerAdapter" class="org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter">
    		<property name="delegate" ref="accountMessageHandler" />
    		<property name="defaultListenerMethod" value="handleMessage"/>
    		<property name="messageConverter" ref="simpleMessageConverter"/>
    	</bean>
    Please let me know your thoughts? any fix for this would be greatly appreciated.
    Last edited by hetti; Dec 22nd, 2010, 05:49 PM.

    Comment


    • #3
      Found the cause (kind of)

      So I found out the problem. I am using ehcache in this app as well, and it was throwing a runtime exception (from something unrleated to amqp) that was not getting caught by my code.

      When it bubbled up to the amqp code (SimpleMessageListener I believe) that class caught the exception and used the runtime as a trigger to call shutdown on the listener. It doesn't close the channel or connection, but it simply stops listening.

      It would be better to see the channel die so that at least we had an indication that something had died becuase just stopping the listener, but leaving the channel open makes it very difficult to see what is going on.

      Comment


      • #4
        Could you create an issue in JIRA for this? It seems like there are a few options to consider.

        Comment


        • #5
          Hi All,

          Since last 2 days I am trying to configure Spring with weblogic 10.0. but fail. kindly help.

          I am using weblogic 10.0 workshop IDE.

          Thanks in advance.

          Comment


          • #6
            issue created.
            I also created one for the other ticket from the forum that no-one has answered, which is how to control startup of spring-amqp inside a app-server.

            Comment


            • #7
              Unfortunately i am not seeing any errors on my logs.

              Comment


              • #8
                I resolved my issue. It was to do with the thread not getting released. Thanks for the help.

                Comment

                Working...
                X