activeMq与spring、dubbo整合报错RpcException/TimeoutException

activeMq和spring的配置可参考http://blog.csdn.net/jiuqiyuliang/article/details/48758203,向队列发送消息报错RpcException和TimeoutException,报错信息为:
Failed to invoke the method defaultSendMessage in the service com.csair.test.user.service.MqService. Tried 3 times of the providers [10.95.58.137:20880] (1/1) from the registry 127.0.0.1:2181 on the consumer 10.95.58.137 using the dubbo version 2.4.9. Last error is: Invoke remote method timeout. method: defaultSendMessage, provider: dubbo://10.95.58.137:20880/com.csair.test.user.service.MqService?accepts=2000&anyhost=true&application=user-test-service-consumer-app&check=false&dubbo=2.4.9&interface=com.csair.test.user.service.MqService&methods=sendMessageToDest,defaultSendMessage,receive&pid=4640&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1507509058403, cause: Waiting server-side response timeout. start time: 2017-10-09 08:32:10.499, end time: 2017-10-09 08:32:11.502, client elapsed: 1 ms, server elapsed: 1002 ms, timeout: 1000 ms, request: Request [id=11, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=defaultSendMessage, parameterTypes=[class java.lang.String], arguments=[testMq], attachments={path=com.csair.test.user.service.MqService, interface=com.csair.test.user.service.MqService, version=0.0.0}]], channel: /10.95.58.137:50025 -> /10.95.58.137:20880
at
Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer.
其他的dubbo服务正常,按照网上的说法,对这个mq的service设置超时时间即可,可能因为mq发送消息耗时较长,provider.xml改为

<dubbo:service interface="com.csair.test.user.service.MqService" ref="mqService" timeout="120000"/>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值