Este conteúdo não está disponível no idioma selecionado.
Chapter 4. Using the LevelDB Persistence Adapter
Abstract
The LevelDB persistence adapter uses LevelDB as a high-performance message store. It allows for higher throughput speeds than the default message store at the cost of potentially higher CPU usage and message store size.
Important
The LevelDB store is available only on Windows, Linux, and Mac OS platforms.
Overview Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The LevelDB message store is a file based message store implemented using Google's LevelDB library to maintain indexes into log files holding the messages. The main advantages of the LevelDB store include:
- higher persistent throughput
- faster recovery times when a broker restarts
- supports concurrent read access
- no pausing during garbage collection cycles
- uses fewer read IO operations to load stored messages
- exposes status via JMX for monitoring
- supports replication
The LevelDB store does have a few known limitations:
- does not support XA transactions
- does not check for duplicate messages
Platform support Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
LevelDB is implemented in C++ and Red Hat JBoss A-MQ accesses the libraries using a JNI driver. JBoss A-MQ also provides an experimental pure Java driver that can be used as well.
The JNI driver is used by default on the following platforms:
- Linux
- OS X
- Windows Vista
- Windows Server 2008
Important
Windows platforms require the MS VC++ 2010 Redistributable package:
All other platforms use the experimental Java drivers.
Basic configuration Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The LevelDB message store is configured by placing a
levelDB element in the persistenceAdapter element of your broker's configuration. The levelDB element's attributes are used to configure the message store.
The attributes, listed in Table 4.1, “Configuration Properties of the LevelDB Message Store”, all have reasonable default values, so you are not required to specify values for them. However, you will want to explicitly specify the location of the message store's data files by providing a value for the
directory attribute. This will ensure that the broker will not conflict with other brokers.
Example 4.1, “Configuring the LevelDB Message Store” shows a basic configuration of the LevelDB message store. The LevelDB files are stored under the
activemq-data directory.
Example 4.1. Configuring the LevelDB Message Store
Configuration attributes Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Table 4.1, “Configuration Properties of the LevelDB Message Store” describes the attributes that can be used to configure the LevelDB message store.