hi,
the full trace I get is:
DEBUG [2013-12-13 11:09:38,335] (AbstractConsumerMessage.java:handleListenerException:43) - ERROR handleStartupFailure rabbit consumer - NOT IllegalStateException No message listener specified - see property 'messageListener'
WARN [2013-12-13 11:09:38,347] (SimpleMessageListenerContainer.java:run:569) - Consumer raised exception, processing can restart if the connection factory supports it
java.lang.IllegalStateException: No message listener specified - see property 'messageListener'
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:494)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:58)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:107)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:608)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:454)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:471)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548)
at java.lang.Thread.run(Thread.java:662)
INFO [2013-12-13 11:09:38,348] (SimpleMessageListenerContainer.java:run:598) - Restarting Consumer: tag=[amq.ctag-36SFE6xkz42Nps6nZ2Eqww], channel=Cached Rabbit Channel: AMQChannel(amqp://guest@127.0.1.1:5672/,6221), acknowledgeMode=AUTO local queue size=0
Why is telling me about the propery messageListener ? No message listener specified - see property 'messageListener'
I have my xml file for configuration something like this:
<rabbit:connection-factory id="connectionFactory" />
<bean id="amqpTemplate" class="org.springframework.amqp.rabbit.core.RabbitTemplate">
<property name="connectionFactory" ref="connectionFactory" />
</bean>
<rabbit:admin connection-factory="connectionFactory" />
<rabbit:queue durable="true" name="queue1" />
<bean id="consumerqueue1"
class="net.test.example.sending.MyConsumer">
<property name="connectionFactory" ref="connectionFactory" />
<property name="queueNames" value="queue1" />
</bean>
<rabbit:listener method="handle" ref="consumerqueue1"
queues="queue1" />
One more question, can it be if a consumer raises this kind of exception and inside do some query to database; leave the database connection open?
Thanks in advance, I do appreciate help here.
<br/><hr align="left" width="300" />
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/Restarting-Consumer-appears-often-tp30919p32048.html">Re: Restarting Consumer appears often</a><br/>
Sent from the <a href="http://rabbitmq.1065348.n5.nabble.com/">RabbitMQ mailing list archive</a> at Nabble.com.<br/>