当我尝试将消息放入队列时出现间歇性问题,但出现错误。
org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException
我从未在 5.15.x 版本中看到此间歇性问题。有谁知道为什么我会遇到错误?
我还观察到,当我成功地从队列中 PUT 和 GET 消息然后我重新启动 ActiveMQ 并尝试将消息 PUT 到队列时,我得到了上述错误。我正在使用 Spring JmsTemplate 创建连接工厂并放置消息。这是我的豆子
<bean id="jmsQueueTemplate" class="org.springframework.jms.core.JmsTemplate">
<!--<constructor-arg>
<ref bean="queueConnectionFactory"/>
</constructor-arg>-->
<property name="connectionFactory">
<ref bean="jmsConnectionFactory"/>
</property>
<!--<property name="defaultDestination" ref="queueDestination" />-->
<property name="defaultDestinationName" value="MY_QUEUE" />
</bean>
<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
<constructor-arg ref="queueConnectionFactory"/>
</bean>
<bean id="queueConnectionFactory" class="org.apache.activemq.ActiveMQSslConnectionFactory" >
<property name="brokerURL" > <util:constant static-field="myURL"/></property>
<property name="keyStore" ref="keystore"/>
<property name="keyStorePassword" ><util:constant static-field="mypws"/></property>
<property name="trustStore" ref="truststore"/>
<property name="trustStorePassword" ><util:constant static-field="mypw"/></property>
<property name="userName" ><util:constant static-field="user"/></property>
<property name="password" ><util:constant static-field="pwsd"/></property>
</bean>```