2 yidefabao2 yidefabao2 于 2014.02.08 16:22 提问

Spring JMS监听器问题
<!-- 消息监听容器 -->  
<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">  
    <property name="concurrentConsumers" value="2" />  
    <property name="connectionFactory" ref="connectionFactory" />    
    <property name="destination" ref="destination" />
    <property name="messageListener" ref="messageReceiver" />
    <property name="pubSubNoLocal" value="false"></property>
</bean>  

如果我的activeMQ没有打开,就一直报这样的错:

    警告: Setup of JMS message listener invoker failed for destination 'queue://emailQueue' - trying to recover. Cause: Connection reset
2014-2-8 16:20:49 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
严重: Could not refresh JMS Connection for destination 'queue://emailQueue' - retrying in 5000 ms. Cause: Error while attempting to retrieve a connection from the pool; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect

怎么不让它报这个错啊?每次开发都把MQ打开,比较麻烦

Csdn user default icon
上传中...
上传图片
插入图片