activemq5.16.0在put消息上间歇性抛出错误

b4wnujal  于 2021-07-26  发布在  Java
关注(0)|答案(2)|浏览(203)

当我试图将消息放入下面的队列时,我看到了间歇性问题。 org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException 我从未在5.15.x版本中看到过这种断断续续的问题。有人知道我为什么会犯以上错误吗?
我还注意到,当我成功地从队列中放置和获取消息时,就会发生这个错误,然后我重新启动activemq并尝试将消息放置到队列中。我正在使用springjmstemplate创建连接工厂并放置消息。这是我的豆子

<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>```
drnojrws

drnojrws1#

请使用100%java jms代码尝试相同的测试。如果问题仍然存在,请使用activemq jira打开一个bug报告,并根据5.16.0进行报告。谢谢!

qnakjoqk

qnakjoqk2#

请使用100%java jms代码尝试相同的测试。如果问题仍然存在,请使用activemq jira打开一个bug报告,并根据5.16.0进行报告。如果它不存在,可能是spring jmstemplate和/或布线配置问题。
谢谢!

相关问题