ActiveMQ调优参考及测试资料

  categories:mq  tags:,   author:

一. 关于ActiveMQ

ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。

相关网站如下:

http://activemq.apache.org/

可以在官网获取常用的帮助文档。

二. 关于Fuse Message Broker

Fuse Message Broker 是FuseSource提供的Apache ActiveMQ可信发布版本。FuseSource 作 为Apache ActiveMQ社区的一部分,负责其所有的开发和bug修复,所以这两者没有什么不同。FuseSource也许比Apache发布的更为频繁,因此可 能Fuse Message Broker发布的版本比Apache ActiveMQ发布的版本在更新bug修复上要响应的更快

相关网站如下:

http://fusesource.com/products/enterprise-activemq/

三. ActiveMQ调优资料

下面是一个ActiveMQ调优参考资料,资料原内容是基于ActiveMQ的Fuse Broker的调优文档

http://pan.baidu.com/s/1o6DHtge

部分参考内容如下下图等

四. Kahadb配置文档

参考网站如下:

http://activemq.apache.org/kahadb.html

部分内容如下:

Configuration

You can configure ActiveMQ to use KahaDB for its persistence adapter – like below:

<broker brokerName=”broker” … >

<persistenceAdapter>

<kahaDB directory=”activemq-data” journalMaxFileLength=”32mb”/>

</persistenceAdapter>

</broker>

KahaDB Properties

property name

default value

Comments

directory

activemq-data

the path to the directory to use to store the message store data and log files

IndexDirectory

If set, configures where the KahaDB index files will be stored. If not set, the index files are stored in the directory specified by the ‘directory’ attribute.

Icon

Available as of ActiveMQ 5.10

indexWriteBatchSize

1000

number of indexes written in a batch

indexCacheSize

10000

number of index pages cached in memory

enableIndexWriteAsync

false

if set, will asynchronously write indexes

journalMaxFileLength

32mb

a hint to set the maximum size of the message data logs

enableJournalDiskSyncs

true

ensure every non transactional journal write is followed by a disk sync (JMS durability requirement)

cleanupInterval

30000

time (ms) before checking for a discarding/moving message data logs that are no longer used

checkpointInterval

5000

time (ms) before checkpointing the journal

ignoreMissingJournalfiles

false

If enabled, will ignore a missing message log file

checkForCorruptJournalFiles

false

If enabled, will check for corrupted Journal files on startup and try and recover them

checksumJournalFiles

false true v5.9

create a checksum for a journal file – to enable checking for corrupted journals

archiveDataLogs

false

If enabled, will move a message data log to the archive directory instead of deleting it.

directoryArchive

null

Define the directory to move data logs to when they all the messages they contain have been consumed.

maxAsyncJobs

10000

the maximum number of asynchronous messages that will be queued awaiting storage (should be the same as the number of concurrent MessageProducers)

concurrentStoreAndDispatchTopics

false

enable the dispatching of Topic messages to interested clients to happen concurrently with message storage

concurrentStoreAndDispatchQueues

true

enable the dispatching of Queue messages to interested clients to happen concurrently with message storage

archiveCorruptedIndex

false

If enabled, corrupted indexes found at startup will be archived (not deleted)

For tuning locking properties please take a look at Pluggable storage lockers

五. Broker相关参考资料

http://fusesource.com/documentation/fuse-message-broker-documentation/

Broker的xml参考文档

http://fusesource.com/docs/broker/5.5/xmlref/index.html

http://activemq.apache.org/slow-consumer-handling.html

慢速处理资料

六. Kahadb持久化相关资料

http://fusesource.com/docs/broker/5.5/persistence/FuseMBPersistIntro.html

Understanding the KahaDB Message Store

Overview

The KahaDB message store is the default persistence store used by Fuse Message Broker. It is a file-based persistence adapter that is optimized for maximum performance. The main features of KahaDB are:

journal-based storage so that messages can be rapidly written to disk

allows for the broker to restart quickly

storing message references in a B-tree index which can be rapidly updated at run time

full support for JMS transactions

various strategies to enable recovery after a disorderly shutdown of the broker

Architecture

The KahaDB message store is an embeddable, transactional message store that is fast and reliable. It is an evolution of the AMQ message store used by Fuse Message Broker 5.0 to 5.3. It uses a transactional journal to store message data and a B-tree index to store message locations for quick retrieval.

Figure 2.1 shows a high-level view of the KahaDB message store.



快乐成长 每天进步一点点      京ICP备18032580号-1