javax.jms.JMSException: Wire format negociation timeout: peer did not send his w

在应用activemq 过程中 ,进行压力测试一段时间后出现,javax.jms.JMSException: Wire format negociation timeout: peer did not send his wire format.
javax.jms.JMSException: Wire format negociation timeout: peer did not send his wire format.
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1185)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1263)
at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:449)

错误。

我的spring 相关配置文件为
<bean id="connectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="failover://(tcp://127.0.0.1:61676)?initialReconnectDelay=30000&maxReconnectAttempts=15" />
<property name="userName" value="" />
<property name="password" value="" />
</bean>
</property>
</bean>

=========================
官方提faq已对这个问题进行描述
出现这个问题有三种
1.确定能连通到mq
You're connecting to the port not used by ActiveMQ TCP transport
Make sure to check that you're connecting to the appropriate host:port
2.说的是关于日志的
这个我没细看
3.在网络不稳定的情况需要加上wireFormat.maxInactivityDurationInitalDelay
我把spring 配置文件更改为
<bean id="connectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://127.0.0.1:61676?wireFormat.maxInactivityDurationInitalDelay=30000" />
<property name="userName" value="" />
<property name="password" value="" />
</bean>
</property>
</bean>

在测试ok
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值