ActiveMQ提示“waiting for space to send transacted message”怎么解决?

u011878308 2013-08-29 08:25:44
ActiveMQ 5.8 , .NET 4.0 , 用C#写了一个测试程序:
启动10个线程,每个线程中有一个producer发送一万条消息。
创建producer的是相同的session,session设置了AcknowledgementMode.Transactional;
producer发完消息后调用一次session.commit();
结果得到标题中提示的错误。
请问这个问题怎么排查?我使用的是AMQ的默认设置
...全文
400 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
FD_2013 2015-02-11
  • 打赏
  • 举报
回复
感觉像是模式设置的不对:enum AcknowledgeMode { /** * With this acknowledgment mode, the session automatically * acknowledges a client's receipt of a message either when * the session has successfully returned from a call to receive * or when the message listener the session has called to * process the message successfully returns. */ AUTO_ACKNOWLEDGE, /** * With this acknowledgment mode, the session automatically * acknowledges a client's receipt of a message either when * the session has successfully returned from a call to receive * or when the message listener the session has called to * process the message successfully returns. Acknowledgments * may be delayed in this mode to increase performance at * the cost of the message being redelivered this client fails. */ DUPS_OK_ACKNOWLEDGE, /** * With this acknowledgment mode, the client acknowledges a * consumed message by calling the message's acknowledge method. */ CLIENT_ACKNOWLEDGE, /** * Messages will be consumed when the transaction commits. */ SESSION_TRANSACTED, /** * Message will be acknowledged individually. Normally the acks sent * acknowledge the given message and all messages received before it, this * mode only acknowledges one message. */ INDIVIDUAL_ACKNOWLEDGE }; 试一下吧
FD_2013 2015-02-11
  • 打赏
  • 举报
回复
从字面意思理解的话貌似是缓冲队列满了。。。。。
u011878308 2013-08-30
  • 打赏
  • 举报
回复
引用 1 楼 hdhai9451 的回复:
使用session让我感觉不是那么,除非不得而以,
activemq要发送和接收必须创建一个session诶。2楼的意思是说我不该用事务吧?我是因为测试的时候发现 producer 采用事务的方式发送可以显著提高性能。
Andy__Huang 2013-08-29
  • 打赏
  • 举报
回复
使用session让我感觉不是那么,除非不得而以,

1,220

社区成员

发帖
与我相关
我的任务
社区描述
企业软件 中间件技术
社区管理员
  • 中间件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧