【ActiveMQ Tuning】JMS Transactions

 http://fusesource.com/docs/broker/5.4/tuning/PersTuning-JmxTxn.html

 

You can improve efficiency of the broker using JMS transactions, because JMS transactions enable the broker to process messages in batches. That is, a batch consists of all the messages a producer sends to the broker before calling commit. Sending messages in batches improves the performance of the persistence layer, because the message store is not required to write the batched messages to disk until commit is called. Hence, the message store accesses the file system less frequently—that is, once per transaction instead of once per message. 

 

    你可以使用JMS Transactions来改善broker的效率,因为JMS事务允许broker批量提交message。 Producer批量发送消息到broker之后,在进行调用commit命令。批量发送消息可以改善持久层的性能,因为没有调用commit语句之前,消息存储是不会把消息写到磁盘上的。因为消息存储机制就不会频繁访问文件系统,也就是说以一个事务一次的频率代替了一个消息一次的频率。


posted on 2012-07-24 15:53  南郭先生kaka  阅读(385)  评论(0编辑  收藏  举报

导航