This closes #78 - doc updates and log manager dep

This commit is contained in:
jbertram 2015-01-23 10:38:27 -06:00
commit 51793627f9
19 changed files with 182 additions and 128 deletions

View File

@ -1,7 +1,10 @@
# Summary
* [Introduction](README.md)
* [Legal Notice](notice.md)
* [Preface](preface.md)
* [Project Info](project-info/project-info.md)
* [Messaging Concepts](messaging-concepts/messaging-concepts.md)
* [Messaging Concepts](messaging-concepts.md)
* [Architecture](architecture.md)
* [Using the Server](using-server.md)
* [Using JMS](using-jms.md)
@ -51,3 +54,4 @@
* [Tools](tools.md)
* [Performance Tuning](perf-tuning.md)
* [Configuration Reference](configuration-index.md)

View File

@ -188,16 +188,10 @@ by the parameters passed to its constructor.
to register the JMS Bridge MBean (must be unique)
The "transactionManager" property points to a JTA transaction manager
implementation. ActiveMQ doesn't ship with such an implementation, but
one is available in the JBoss Community. If you are running ActiveMQ in
standalone mode and wish to use a JMS bridge simply download the latest
version of JBossTS from http://www.jboss.org/jbosstm/downloads and add
it to ActiveMQ's classpath. If you are running ActiveMQ with JBoss AS
then you won't need to do this as JBoss AS ships with a JTA transaction
manager already. The bean definition for the transaction manager would
look something like this:
<bean name="RealTransactionManager" class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
implementation and should be set if you need to use the 'ONCE_AND_ONCE_ONLY'
Quality of Service. ActiveMQ doesn't ship with such an implementation, but
if you are running within an Application Server you can inject the Transaction
Manager that is shipped.
## Source and Target Connection Factories
@ -258,12 +252,8 @@ server instance then this can be achieved by sending and acknowledging
the messages in the same local transaction. If the source and
destination are on different servers this is achieved by enlisting the
sending and consuming sessions in a JTA transaction. The JTA transaction
is controlled by JBoss Transactions JTA \* implementation which is a
fully recovering transaction manager, thus providing a very high degree
of durability. If JTA is required then both supplied connection
factories need to be XAConnectionFactory implementations. This is likely
to be the slowest mode since it requires extra persistence for the
transaction logging.
is controlled by a JTA Transaction Manager which will need to be set
via the settransactionManager method on the Bridge.
This mode is only available for durable messages.

View File

@ -32,7 +32,7 @@ large messages are stored.
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
...
<large-messages-directory>/data/large-messages</large-messages-directory>
...
@ -151,11 +151,38 @@ messages or `java.io.OutputStream` for receiving them.
The following table shows a list of methods available at `ClientMessage`
which are also available through JMS by the use of object properties.
Name Description JMS Equivalent Property
--------------------------------- ---------------------------------------------------------------------------------------------------------------------------------- -------------------------
setBodyInputStream(InputStream) Set the InputStream used to read a message body when sending it. JMS\_HQ\_InputStream
setOutputStream(OutputStream) Set the OutputStream that will receive the body of a message. This method does not block. JMS\_HQ\_OutputStream
saveOutputStream(OutputStream) Save the body of the message to the `OutputStream`. It will block until the entire content is transferred to the `OutputStream`. JMS\_HQ\_SaveStream
<table summary="Server Configuration" border="1">
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>JMS Equivalent</th>
</tr>
</thead>
<tbody>
<tr>
<td>setBodyInputStream(InputStream)</td>
<td>Set the InputStream used to read a message body when sending it.</td>
<td>JMS_HQ_InputStream</td>
</tr>
<tr>
<td>setOutputStream(OutputStream)</td>
<td>Set the OutputStream that will receive the body of a message. This method does not block.</td>
<td>JMS_HQ_OutputStream</td>
</tr>
<tr>
<td>saveOutputStream(OutputStream)</td>
<td>Save the body of the message to the `OutputStream`. It will block until the entire content is transferred to the `OutputStream`.</td>
<td>JMS_HQ_SaveStream</td>
</tr>
</tbody>
</table>
: org.apache.activemq.api.core.client.ClientMessage API
@ -271,5 +298,5 @@ for (int i = 0; i < rm.getBodyLength(); i += 1024)
## Large message example
Please see ? for an example which shows how large message is configured
Please see the [examples](examples.md) chapter for an example which shows how large message is configured
and used with JMS.

View File

@ -49,5 +49,5 @@ System.out.format("Received message: %s\n", messageReceived.getText());
## Example
See ? for an example which shows how last value queues are configured
See the [examples](examples.md) chapter for an example which shows how last value queues are configured
and used with JMS.

View File

@ -7,14 +7,44 @@ the console and to a file.
There are 6 loggers available which are as follows:
Logger Logger Description
------------------------------------------- ----------------------------------------------------
org.jboss.logging Logs any calls not handled by the ActiveMQ loggers
org.apache.activemq.core.server Logs the core server
org.apache.activemq.utils Logs utility calls
org.apache.activemq.journal Logs Journal calls
org.apache.activemq.jms Logs JMS calls
org.apache.activemq.integration.bootstrap Logs bootstrap calls
<table summary="Loggers" border="1">
<colgroup>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Logger</th>
<th>Logger Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>org.jboss.logging</td>
<td>Logs any calls not handled by the ActiveMQ loggers</td>
</tr>
<tr>
<td>org.apache.activemq.core.server</td>
<td>Logs the core server</td>
</tr>
<tr>
<td>org.apache.activemq.utils</td>
<td>Logs utility calls</td>
</tr>
<tr>
<td>org.apache.activemq.journal</td>
<td>Logs Journal calls</td>
</tr>
<tr>
<td>org.apache.activemq.jms</td>
<td>Logs JMS calls</td>
</tr>
<tr>
<td>org.apache.activemq.integration.bootstrap </td>
<td>Logs bootstrap calls</td>
</tr>
</tbody>
</table>
: Global Configuration Properties
@ -27,12 +57,12 @@ add the following dependencies.
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>1.3.1.Final</version>
<version>1.5.3.Final</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core-client</artifactId>
<version>2.3.0.Final</version>
<version>6.0.0</version>
</dependency>
There are 2 properties you need to set when starting your java program,

View File

@ -541,9 +541,22 @@ is also deployed to allow access to the mbean server via rest.
### Example
See ? for an example which shows how to use a remote connection to JMX
See the [chapters](examples.md) chapter for an example which shows how to use a remote connection to JMX
and MBean proxies to manage ActiveMQ.
### Exposing JMX using Jolokia
The default Broker configuration ships with the [Jolokia](http://www.jolokia.org)
http agent deployed as a Web Application. Jolokia is a remote
JMX over HTTP bridge that exposed mBeans, for a full guids as
to how to use refer to [Jolokia Documentation](http://www.jolokia.org/documentation.html),
however a simple example to query thebrokers version would
be to use a brower and go to the URL http://localhost:8161/jolokia/read/org.apache.activemq:module=Core,type=Server/Version.
This would give you back something like the following:
{"timestamp":1422019706,"status":200,"request":{"mbean":"org.apache.activemq:module=Core,type=Server","attribute":"Version","type":"read"},"value":"6.0.0.SNAPSHOT (Active Hornet, 126)"}
## Using Management Via Core API
The core management API in ActiveMQ is called by sending Core messages
@ -685,8 +698,8 @@ steps are the same (see Configuring Core Management section).
### Example
See ? for an example which shows how to use JMS messages to manage
ActiveMQ server.
See the [examples](examples.md) chapter for an example which shows
how to use JMS messages to manage the ActiveMQ server.
## Management Notifications
@ -787,8 +800,7 @@ notificationConsumer.setMessageListener(new MessageListener()
```
### Example
See ? for an example which shows how to use a JMS `MessageListener` to
receive management notifications from ActiveMQ server.
See the [examples](examples.md) chapter for an example which shows how to use a JMS `MessageListener` to receive management notifications from ActiveMQ server.
### Notification Types and Headers
@ -978,5 +990,4 @@ messageCounter.getMessageCountDelta());
### Example
See ? for an example which shows how to use message counters to retrieve
information on a JMS `Queue`.
See the [examples](examples.md) chapter for an example which shows how to use message counters to retrieve information on a JMS `Queue`.

View File

@ -76,5 +76,4 @@ The reaper thread can be configured with the following properties in
## Example
See ? for an example which shows how message expiry is configured and
used with JMS.
See the [examples.md](examples.md) chapter for an example which shows how message expiry is configured and used with JMS.

View File

@ -84,13 +84,7 @@ which is available in the context by default:
## Example
See ? for an example which shows how message groups are configured and
used with JMS.
## Example
See ? for an example which shows how message groups are configured via a
connection factory.
See the [examples](examples.md} chapter for an example which shows how message groups are configured and used with JMS and via a connection factory.
## Clustered Grouping
@ -186,5 +180,4 @@ Some best practices should be followed when using clustered grouping:
## Clustered Grouping Example
See ? for an example of how to configure message groups with a ActiveMQ
cluster
See the [examples](examples.md) chapter for an example of how to configure message groups with a ActiveMQ Cluster.

View File

@ -37,7 +37,7 @@ Global paging parameters are specified on the main configuration file
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
...
<paging-directory>/somewhere/paging-directory</paging-directory>
...
@ -76,14 +76,42 @@ configuration file (`activemq-configuration.xml`).
This is the list of available parameters on the address settings.
Property Name Description Default
----------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ----------------------------------
`max-size-bytes` What's the max memory the address could have before entering on page mode. -1 (disabled)
`page-size-bytes` The size of each page file used on the paging system 10MiB (10 \* 1024 \* 1024 bytes)
`address-full-policy` This must be set to PAGE for paging to enable. If the value is PAGE then further messages will be paged to disk. If the value is DROP then further messages will be silently dropped. If the value is FAIL then the messages will be dropped and the client message producers will receive an exception. If the value is BLOCK then client message producers will block when they try and send further messages. PAGE
`page-max-cache-size` The system will keep up to \<`page-max-cache-size` page files in memory to optimize IO during paging navigation. 5
: Paging Address Settings
<table summary="Server Configuration" border="1">
<colgroup>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Property Name</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>`max-size-bytes`</td>
<td>What's the max memory the address could have before entering on page mode.</td>
<td>-1 (disabled)</td>
</tr>
<tr>
<td>`page-size-bytes`</td>
<td>The size of each page file used on the paging system</td>
<td>10MiB (10 \* 1024 \* 1024 bytes)</td>
</tr>
<tr>
<td>`address-full-policy`</td>
<td>This must be set to PAGE for paging to enable. If the value is PAGE then further messages will be paged to disk. If the value is DROP then further messages will be silently dropped. If the value is FAIL then the messages will be dropped and the client message producers will receive an exception. If the value is BLOCK then client message producers will block when they try and send further messages.</td>
<td>PAGE</td>
</tr>
<tr>
<td>`page-max-cache-size`</td>
<td>The system will keep up to \<`page-max-cache-size` page files in memory to optimize IO during paging navigation.</td>
<td>5</td>
</tr>
</tbody>
</table>
## Dropping messages
@ -147,4 +175,4 @@ undesirable state.
## Example
See ? for an example which shows how to use paging with ActiveMQ.
See the [examples]9examples.md) chapter for an example which shows how to use paging with ActiveMQ.

View File

@ -115,7 +115,7 @@ tuning:
for more information.
- Send messages non blocking. Setting `block-on-durable-send` and
`block-on-non-durable-send` to `false` in `activemq-jms.xml` (if
`block-on-non-durable-send` to `false` in the jms config (if
you're using JMS and JNDI) or directly on the ServerLocator. This
means you don't have to wait a whole network round trip for every
message sent. See [Guarantees of sends and commits](send-guarantees.md)

View File

@ -84,5 +84,4 @@ the exception the message is individually acked.
## Example
See ? for an example which shows how to use pre-acknowledgement mode
with JMS.
See the [examples](examples.md) chapter for an example which shows how to use pre-acknowledgement mode with JMS.

View File

@ -10,7 +10,7 @@ attribute has.
Queues can be predefined via configuration at a core level or at a JMS
level. Firstly let's look at a JMS level.
The following shows a queue predefined in the `activemq-jms.xml`
The following shows a queue predefined in the jms element of the `activemq-configuration.xml`
configuration file.
<queue name="selectorQueue">

View File

@ -140,28 +140,6 @@ Maven pom.xml that can build your WAR for this case.
</dependencies>
</project>
> **Note**
>
> JBoss AS 7 loads classes differently than previous versions. To work
> properly in AS 7 the WAR will need this in its MANIFEST.MF:
>
> Dependencies: org.apache.activemq, org.jboss.netty
>
> You can add this to the`<plugins>` section of the pom.xml to create
> this entry automatically:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <archive>
> <manifestEntries>
> <Dependencies>org.apache.activemq, org.jboss.netty</Dependencies>
> </manifestEntries>
> </archive>
> </configuration>
> </plugin>
It is worth noting that when deploying a WAR in a Java EE application
server like AS7 the URL for the resulting application will include the
name of the WAR by default. For example, if you've constructed a WAR as
@ -169,11 +147,6 @@ described above named "activemq-rest.war" then clients will access it
at, e.g. http://localhost:8080/activemq-rest/[queues|topics]. We'll see
more about this later.
> **Note**
>
> It is possible to put the WAR file at the "root context" of AS7, but
> that is beyond the scope of this documentation.
### Bootstrapping ActiveMQ Along with REST
You can bootstrap ActiveMQ within your WAR as well. To do this, you must

View File

@ -30,5 +30,5 @@ same property on the core message before sending.
## Example
See ? for an example which shows how scheduled messages can be used with
See the [examples](examples.md) chapter for an example which shows how scheduled messages can be used with
JMS.

View File

@ -259,7 +259,7 @@
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>1.5.1.Final</version>
<version>1.5.3.Final</version>
<!-- License: Apache 2.0 -->
</dependency>
<dependency>