`

13.1 通用调优技术

阅读更多

博客已搬家, 更好阅读体验, 猛戳 http://www.jack-yin.com/coding/translation/activemq-in-action/1789.html

 

13.1 General techniques

13.1 通用调优技术

 

You can do two simple things to improve JMS messaging performance: use nonpersistent

messaging, or if you really need guaranteed messaging, then use transactions to

batch up large groups of messages. Usually nonpersistent message delivery isn’t a consideration

unless you don’t care that a message will be lost (for example, in real-time

data feeds, since the status will be sent repeatedly within such a short period of time),

and batching messages in transactions won’t always be applicable. But ActiveMQ incorporates

failsafes for reliable delivery of nonpersistent messages so that only catastrophic

failure would result in message loss. In this section we’ll explain why nonpersistent

message delivery and batching messages are faster, and why they could be

applicable to use in your application if you don’t need to absolutely guarantee that

messages will never be lost.

 

有两种简单方式可以提升JMS消息性能:使用非持久化消息,或者在需要确保消息发送成功时使用事务来将

消息分批组合.通常不考虑使用非持久化消息分发除非你不在乎消息可能会丢失(比如,一个实时的数据源,

因为状态数据在很短的时间内会重复发送),并且使用事务将消息分批也不总是可行的.但是ActiveMQ为非

持久化的消息分发采用了失效安全策略,因此只有灾难性的失败才会导致消息丢失.本节中我们将解释为什么

非持久化消息和消息分批会更快,以及为什么在不需要绝对保证消息不会丢失的情况下,可以将它们可应用在

你的程序中.

 

13.1.1 Persistent versus nonpersistent messages

13.1.1 持久化消息 VS 非持久化消息

 

.......................

 

博客已搬家, 更好阅读体验, 猛戳 http://www.jack-yin.com/coding/translation/activemq-in-action/1789.html

0
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics