documentation updates

This commit is contained in:
Andy Taylor 2015-01-23 14:28:07 +00:00
parent 45a081c72a
commit 3d3829db4f
18 changed files with 181 additions and 127 deletions

View File

@ -1,7 +1,10 @@
# Summary
* [Introduction](README.md)
* [Legal Notice](notice.md) * [Legal Notice](notice.md)
* [Preface](preface.md) * [Preface](preface.md)
* [Project Info](project-info/project-info.md) * [Project Info](project-info/project-info.md)
* [Messaging Concepts](messaging-concepts/messaging-concepts.md) * [Messaging Concepts](messaging-concepts.md)
* [Architecture](architecture.md) * [Architecture](architecture.md)
* [Using the Server](using-server.md) * [Using the Server](using-server.md)
* [Using JMS](using-jms.md) * [Using JMS](using-jms.md)
@ -51,3 +54,4 @@
* [Tools](tools.md) * [Tools](tools.md)
* [Performance Tuning](perf-tuning.md) * [Performance Tuning](perf-tuning.md)
* [Configuration Reference](configuration-index.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) to register the JMS Bridge MBean (must be unique)
The "transactionManager" property points to a JTA transaction manager The "transactionManager" property points to a JTA transaction manager
implementation. ActiveMQ doesn't ship with such an implementation, but implementation and should be set if you need to use the 'ONCE_AND_ONCE_ONLY'
one is available in the JBoss Community. If you are running ActiveMQ in Quality of Service. ActiveMQ doesn't ship with such an implementation, but
standalone mode and wish to use a JMS bridge simply download the latest if you are running within an Application Server you can inject the Transaction
version of JBossTS from http://www.jboss.org/jbosstm/downloads and add Manager that is shipped.
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"/>
## Source and Target Connection Factories ## 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 the messages in the same local transaction. If the source and
destination are on different servers this is achieved by enlisting the destination are on different servers this is achieved by enlisting the
sending and consuming sessions in a JTA transaction. The JTA transaction sending and consuming sessions in a JTA transaction. The JTA transaction
is controlled by JBoss Transactions JTA \* implementation which is a is controlled by a JTA Transaction Manager which will need to be set
fully recovering transaction manager, thus providing a very high degree via the settransactionManager method on the Bridge.
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.
This mode is only available for durable messages. This mode is only available for durable messages.

View File

@ -32,7 +32,7 @@ large messages are stored.
<configuration xmlns="urn:activemq" <configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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> <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` The following table shows a list of methods available at `ClientMessage`
which are also available through JMS by the use of object properties. which are also available through JMS by the use of object properties.
Name Description JMS Equivalent Property <table summary="Server Configuration" border="1">
--------------------------------- ---------------------------------------------------------------------------------------------------------------------------------- ------------------------- <colgroup>
setBodyInputStream(InputStream) Set the InputStream used to read a message body when sending it. JMS\_HQ\_InputStream <col/>
setOutputStream(OutputStream) Set the OutputStream that will receive the body of a message. This method does not block. JMS\_HQ\_OutputStream <col/>
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 <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 : org.apache.activemq.api.core.client.ClientMessage API
@ -271,5 +298,5 @@ for (int i = 0; i < rm.getBodyLength(); i += 1024)
## Large message example ## 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. and used with JMS.

View File

@ -49,5 +49,5 @@ System.out.format("Received message: %s\n", messageReceived.getText());
## Example ## 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. 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: There are 6 loggers available which are as follows:
Logger Logger Description <table summary="Loggers" border="1">
------------------------------------------- ---------------------------------------------------- <colgroup>
org.jboss.logging Logs any calls not handled by the ActiveMQ loggers <col/>
org.apache.activemq.core.server Logs the core server <col/>
org.apache.activemq.utils Logs utility calls </colgroup>
org.apache.activemq.journal Logs Journal calls <thead>
org.apache.activemq.jms Logs JMS calls <tr>
org.apache.activemq.integration.bootstrap Logs bootstrap calls <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 : Global Configuration Properties
@ -27,12 +57,12 @@ add the following dependencies.
<dependency> <dependency>
<groupId>org.jboss.logmanager</groupId> <groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId> <artifactId>jboss-logmanager</artifactId>
<version>1.3.1.Final</version> <version>1.5.3.Final</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.activemq</groupId> <groupId>org.apache.activemq</groupId>
<artifactId>activemq-core-client</artifactId> <artifactId>activemq-core-client</artifactId>
<version>2.3.0.Final</version> <version>6.0.0</version>
</dependency> </dependency>
There are 2 properties you need to set when starting your java program, 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 ### 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. 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 ## Using Management Via Core API
The core management API in ActiveMQ is called by sending Core messages 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 ### Example
See ? for an example which shows how to use JMS messages to manage See the [examples](examples.md) chapter for an example which shows
ActiveMQ server. how to use JMS messages to manage the ActiveMQ server.
## Management Notifications ## Management Notifications
@ -787,8 +800,7 @@ notificationConsumer.setMessageListener(new MessageListener()
``` ```
### Example ### Example
See ? for an example which shows how to use a JMS `MessageListener` to See the [examples](examples.md) chapter for an example which shows how to use a JMS `MessageListener` to receive management notifications from ActiveMQ server.
receive management notifications from ActiveMQ server.
### Notification Types and Headers ### Notification Types and Headers
@ -978,5 +990,4 @@ messageCounter.getMessageCountDelta());
### Example ### Example
See ? for an example which shows how to use message counters to retrieve See the [examples](examples.md) chapter for an example which shows how to use message counters to retrieve information on a JMS `Queue`.
information on a JMS `Queue`.

View File

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

View File

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

View File

@ -37,7 +37,7 @@ Global paging parameters are specified on the main configuration file
<configuration xmlns="urn:activemq" <configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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> <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. This is the list of available parameters on the address settings.
Property Name Description Default <table summary="Server Configuration" border="1">
----------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------- <colgroup>
`max-size-bytes` What's the max memory the address could have before entering on page mode. -1 (disabled) <col/>
`page-size-bytes` The size of each page file used on the paging system 10MiB (10 \* 1024 \* 1024 bytes) <col/>
`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 <col/>
`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 </colgroup>
<thead>
: Paging Address Settings <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 ## Dropping messages
@ -147,4 +175,4 @@ undesirable state.
## Example ## 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. for more information.
- Send messages non blocking. Setting `block-on-durable-send` and - 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 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 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) 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 ## Example
See ? for an example which shows how to use pre-acknowledgement mode See the [examples](examples.md) chapter for an example which shows how to use pre-acknowledgement mode with JMS.
with JMS.

View File

@ -10,7 +10,7 @@ attribute has.
Queues can be predefined via configuration at a core level or at a JMS Queues can be predefined via configuration at a core level or at a JMS
level. Firstly let's look at a JMS level. 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. configuration file.
<queue name="selectorQueue"> <queue name="selectorQueue">

View File

@ -140,28 +140,6 @@ Maven pom.xml that can build your WAR for this case.
</dependencies> </dependencies>
</project> </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 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 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 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 at, e.g. http://localhost:8080/activemq-rest/[queues|topics]. We'll see
more about this later. 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 ### Bootstrapping ActiveMQ Along with REST
You can bootstrap ActiveMQ within your WAR as well. To do this, you must 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 ## 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. JMS.