http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/diverts.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/diverts.md b/docs/user-manual/en/diverts.md index 7408f4b..5681e96 100644 --- a/docs/user-manual/en/diverts.md +++ b/docs/user-manual/en/diverts.md @@ -117,9 +117,9 @@ non-exclusive divert, again from the divert example: ```xml <divert name="order-divert"> - <address>orders</address> - <forwarding-address>spyTopic</forwarding-address> - <exclusive>false</exclusive> + <address>orders</address> + <forwarding-address>spyTopic</forwarding-address> + <exclusive>false</exclusive> </divert> ```
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/duplicate-detection.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/duplicate-detection.md b/docs/user-manual/en/duplicate-detection.md index c96c702..b3e9535 100644 --- a/docs/user-manual/en/duplicate-detection.md +++ b/docs/user-manual/en/duplicate-detection.md @@ -48,7 +48,7 @@ already received a message with that value of the header. If it has received a message with the same value before then it will ignore the message. -> **Note** +> **Note:** > > Using duplicate detection to move messages between nodes can give you > the same *once and only once* delivery guarantees as if you were using @@ -118,7 +118,7 @@ configured by the parameter `persist-id-cache`, also in be persisted to permanent storage as they are received. The default value for this parameter is `true`. -> **Note** +> **Note:** > > When choosing a size of the duplicate id cache be sure to set it to a > larger enough size so if you resend messages all the previously sent http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/embedding-activemq.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/embedding-activemq.md b/docs/user-manual/en/embedding-activemq.md index d309a58..3dcfb31 100644 --- a/docs/user-manual/en/embedding-activemq.md +++ b/docs/user-manual/en/embedding-activemq.md @@ -1,29 +1,30 @@ # Embedding Apache ActiveMQ Artemis -Apache ActiveMQ Artemis is designed as set of simple Plain Old Java Objects (POJOs). -This means Apache ActiveMQ Artemis can be instantiated and run in any dependency -injection framework such as Spring or Google Guice. It also means that if you have an application that could use -messaging functionality internally, then it can *directly instantiate* -Apache ActiveMQ Artemis clients and servers in its own application code to perform that -functionality. We call this *embedding* Apache ActiveMQ Artemis. - -Examples of applications that might want to do this include any -application that needs very high performance, transactional, persistent -messaging but doesn't want the hassle of writing it all from scratch. - -Embedding Apache ActiveMQ Artemis can be done in very few easy steps. Instantiate the -configuration object, instantiate the server, start it, and you have a -Apache ActiveMQ Artemis running in your virtual machine. It's as simple and easy as -that. +Apache ActiveMQ Artemis is designed as set of simple Plain Old Java Objects +(POJOs). This means Apache ActiveMQ Artemis can be instantiated and run in any +dependency injection framework such as Spring or Google Guice. It also means +that if you have an application that could use messaging functionality +internally, then it can *directly instantiate* Apache ActiveMQ Artemis clients +and servers in its own application code to perform that functionality. We call +this *embedding* Apache ActiveMQ Artemis. + +Examples of applications that might want to do this include any application +that needs very high performance, transactional, persistent messaging but +doesn't want the hassle of writing it all from scratch. + +Embedding Apache ActiveMQ Artemis can be done in very few easy steps. +Instantiate the configuration object, instantiate the server, start it, and you +have a Apache ActiveMQ Artemis running in your virtual machine. It's as simple +and easy as that. ## Simple Config File Embedding -The simplest way to embed Apache ActiveMQ Artemis is to use the embedded wrapper -classes and configure Apache ActiveMQ Artemis through its configuration files. There -are two different helper classes for this depending on whether your -using the Apache ActiveMQ Artemis Core API or JMS. +The simplest way to embed Apache ActiveMQ Artemis is to use the embedded +wrapper classes and configure Apache ActiveMQ Artemis through its configuration +files. There are two different helper classes for this depending on whether +your using the Apache ActiveMQ Artemis Core API or JMS. -## Embeddeing Apache ActiveMQ Artemis Server +## Embedding an Apache ActiveMQ Artemis Broker For instantiating a core Apache ActiveMQ Artemis Server, the steps are pretty simple. The example requires that you have defined a configuration file @@ -38,9 +39,9 @@ EmbeddedActiveMQ embedded = new EmbeddedActiveMQ(); embedded.start(); -ClientSessionFactory nettyFactory = ActiveMQClient.createClientSessionFactory( - new TransportConfiguration( - InVMConnectorFactory.class.getName())); +ServerLocator serverLocator = ActiveMQClient.createServerLocator("vm://0"); + +ClientSessionFactory factory = serverLocator.createSessionFactory(); ClientSession session = factory.createSession(); @@ -65,23 +66,22 @@ System.out.println("message = " + msgReceived.getBody().readString()); session.close(); ``` -The `EmbeddedActiveMQ` class has a few additional setter methods that -allow you to specify a different config file name as well as other -properties. See the javadocs for this class for more details. +The `EmbeddedActiveMQ` class has a few additional setter methods that allow you +to specify a different config file name as well as other properties. See the +javadocs for this class for more details. ## POJO instantiation - Embedding Programmatically -You can follow this step-by-step guide to programmatically embed the -core, non-JMS Apache ActiveMQ Artemis Server instance: +You can follow this step-by-step guide to programmatically embed the core, +non-JMS Apache ActiveMQ Artemis Server instance: -Create the configuration object - this contains configuration -information for an Apache ActiveMQ Artemis instance. The setter methods of this class -allow you to programmatically set configuration options as describe in -the [Server Configuration](configuration-index.md) section. +Create the configuration object - this contains configuration information for +an Apache ActiveMQ Artemis instance. The setter methods of this class allow you +to programmatically set configuration options as describe in the [Server +Configuration](configuration-index.md) section. -The acceptors are configured through `ConfigurationImpl`. Just add the -`NettyAcceptorFactory` on the transports the same way you would through -the main configuration file. +The acceptors are configured through `Configuration`. Just add the acceptor URL +the same way you would through the main configuration file. ```java import org.apache.activemq.artemis.core.config.Configuration; @@ -90,12 +90,9 @@ import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; ... Configuration config = new ConfigurationImpl(); -HashSet<TransportConfiguration> transports = new HashSet<TransportConfiguration>(); - -transports.add(new TransportConfiguration(NettyAcceptorFactory.class.getName())); -transports.add(new TransportConfiguration(InVMAcceptorFactory.class.getName())); -config.setAcceptorConfigurations(transports); +config.addAcceptorConfiguration("in-vm", "vm://0"); +config.addAcceptorConfiguration("tcp", "tcp://127.0.0.1:61616"); ``` You need to instantiate an instance of @@ -123,8 +120,9 @@ server.start(); ## Dependency Frameworks -You may also choose to use a dependency injection framework such as -The Spring Framework. See [Spring Integration](spring-integration.md) for more details on +You may also choose to use a dependency injection framework such as The Spring +Framework. See [Spring Integration](spring-integration.md) for more details on Spring and Apache ActiveMQ Artemis. -Apache ActiveMQ Artemis standalone uses [Airline](https://github.com/airlift/airline) to bootstrap. +Apache ActiveMQ Artemis standalone uses +[Airline](https://github.com/airlift/airline) to bootstrap. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/examples.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/examples.md b/docs/user-manual/en/examples.md index 1f76dd7..70d5ee0 100644 --- a/docs/user-manual/en/examples.md +++ b/docs/user-manual/en/examples.md @@ -1,10 +1,10 @@ -Examples -======== +# Examples -The Apache ActiveMQ Artemis distribution comes with over 90 run out-of-the-box examples demonstrating many of the features. +The Apache ActiveMQ Artemis distribution comes with over 90 run out-of-the-box +examples demonstrating many of the features. -The examples are available in both the binary and source distribution under the `examples` directory. Examples are split - by the following source tree: +The examples are available in both the binary and source distribution under the +`examples` directory. Examples are split by the following source tree: - features - Examples containing broker specific features. - clustered - examples showing load balancing and distribution capabilities. @@ -18,59 +18,70 @@ The examples are available in both the binary and source distribution under the - openwire - stomp -Running the Examples -===================== +## Running the Examples -To run any example, simply `cd` into the appropriate example directory and type `mvn verify` or `mvn install` (For -details please read the readme.html in each example directory). +To run any example, simply `cd` into the appropriate example directory and type +`mvn verify` or `mvn install` (For details please read the readme.html in each +example directory). -You can use the profile `-Pexamples` to run multiple examples under any example tree. +You can use the profile `-Pexamples` to run multiple examples under any example +tree. -For each server, you will have a created server under `./target/server0` (some examples use more than one server). +For each server, you will have a created server under `./target/server0` (some +examples use more than one server). -You have the option to prevent the example from starting the server (e.g. if you want to start the server manually) by -simply specifying the `-PnoServer` profile, e.g.: +You have the option to prevent the example from starting the server (e.g. if +you want to start the server manually) by simply specifying the `-PnoServer` +profile, e.g.: ```sh # running an example without running the server mvn verify -PnoServer ``` -Also under `./target` there will be a script repeating the commands to create each server. Here is the `create-server0.sh` -generated by the `Queue` example. This is useful to see exactly what command(s) are required to configure the server(s). +Also under `./target` there will be a script repeating the commands to create +each server. Here is the `create-server0.sh` generated by the `Queue` example. +This is useful to see exactly what command(s) are required to configure the +server(s). ```sh # These are the commands used to create server0 -/myInstallDirectory/apache-artemis-1.1.0/bin/artemis create --allow-anonymous --silent --force --no-web --user guest --password guest --role guest --port-offset 0 --data ./data --allow-anonymous --no-autotune --verbose /myInstallDirectory/apache-artemis-1.1.0/examples/features/standard/queue/target/server0 +/myInstallDirectory/apache-artemis/bin/artemis create --allow-anonymous --silent --force --no-web --user guest --password guest --role guest --port-offset 0 --data ./data --allow-anonymous --no-autotune --verbose /myInstallDirectory/apache-artemis-1.1.0/examples/features/standard/queue/target/server0 ``` -Several examples use UDP clustering which may not work in your environment by default. On linux the command would be: +Several examples use UDP clustering which may not work in your environment by +default. On linux the command would be: ```sh route add -net 224.0.0.0 netmask 240.0.0.0 dev lo ``` -This command should be run as root. This will redirect any traffic directed to `224.0.0.0` to the loopback interface. -On Mac OS X, the command is slightly different: +This command should be run as root. This will redirect any traffic directed to +`224.0.0.0` to the loopback interface. On Mac OS X, the command is slightly +different: -``` sh +```sh sudo route add 224.0.0.0 127.0.0.1 -netmask 240.0.0.0 ``` -All the examples use the [Maven plugin](maven-plugin.md), which can be useful for running your test servers as well. +All the examples use the [Maven plugin](maven-plugin.md), which can be useful +for running your test servers as well. -This is the common output when running an example. On this case taken from the `Queue` example: +This is the common output when running an example. On this case taken from the +`Queue` example: ```sh [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ -[INFO] Building ActiveMQ Artemis JMS Queue Example 1.1.0 +[INFO] Building ActiveMQ Artemis JMS Queue Example 2.5.0 [INFO] ------------------------------------------------------------------------ [INFO] +[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ queue --- +[INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ queue --- [INFO] -[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ queue --- +[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ queue --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ queue --- [INFO] Using 'UTF-8' encoding to copy filtered resources. @@ -78,17 +89,16 @@ This is the common output when running an example. On this case taken from the ` [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ queue --- -[INFO] Changes detected - recompiling the module! -[INFO] Compiling 1 source file to /work/apache-artemis-1.1.0/examples/features/standard/queue/target/classes +[INFO] Nothing to compile - all classes are up to date [INFO] -[INFO] --- maven-checkstyle-plugin:2.16:check (default) @ queue --- +[INFO] --- maven-checkstyle-plugin:2.17:check (default) @ queue --- [INFO] -[INFO] --- apache-rat-plugin:0.11:check (default) @ queue --- +[INFO] --- apache-rat-plugin:0.12:check (default) @ queue --- [INFO] RAT will not execute since it is configured to be skipped via system property 'rat.skip'. [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ queue --- [INFO] Using 'UTF-8' encoding to copy filtered resources. -[INFO] skip non existing resourceDirectory /work/apache-artemis-1.1.0/examples/features/standard/queue/src/test/resources +[INFO] skip non existing resourceDirectory /home/user/activemq-artemis/examples/features/standard/queue/src/test/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ queue --- @@ -97,815 +107,739 @@ This is the common output when running an example. On this case taken from the ` [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ queue --- [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ queue --- -[INFO] Building jar: /work/apache-artemis-1.1.0/examples/features/standard/queue/target/queue-1.1.0.jar +[INFO] Building jar: /home/user/activemq-artemis/examples/features/standard/queue/target/queue-2.5.0.jar [INFO] [INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ queue --- [INFO] [INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) > generate-sources @ queue >>> [INFO] +[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ queue --- +[INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ queue --- [INFO] [INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) < generate-sources @ queue <<< [INFO] +[INFO] [INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ queue --- -[INFO] Building jar: /work/apache-artemis-1.1.0/examples/features/standard/queue/target/queue-1.1.0-sources.jar +[INFO] Building jar: /home/user/activemq-artemis/examples/features/standard/queue/target/queue-2.5.0-sources.jar [INFO] [INFO] >>> maven-source-plugin:2.2.1:jar (default) > generate-sources @ queue >>> [INFO] +[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ queue --- +[INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ queue --- [INFO] [INFO] <<< maven-source-plugin:2.2.1:jar (default) < generate-sources @ queue <<< [INFO] +[INFO] [INFO] --- maven-source-plugin:2.2.1:jar (default) @ queue --- [INFO] -[INFO] --- artemis-maven-plugin:1.1.0:create (create) @ queue --- +[INFO] --- dependency-check-maven:1.4.3:check (default) @ queue --- +[INFO] Skipping dependency-check +[INFO] +[INFO] --- artemis-maven-plugin:2.5.0:create (create) @ queue --- [INFO] Local id: local - url: file:///Users/apacheuser/.m2/repository/ + url: file:///home/user/.m2/repository/ layout: default snapshots: [enabled => true, update => always] releases: [enabled => true, update => always] [INFO] Entries.size 2 -[INFO] ... key=project = MavenProject: org.apache.activemq.examples.broker:queue:1.1.0 @ /work/apache-artemis-1.1.0/examples/features/standard/queue/pom.xml -[INFO] ... key=pluginDescriptor = Component Descriptor: role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisCLIPlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:1.1.0:cli' -role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisCreatePlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:1.1.0:create' -role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisClientPlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:1.1.0:runClient' +[INFO] ... key=project = MavenProject: org.apache.activemq.examples.broker:queue:2.5.0 @ /home/user/activemq-artemis/examples/features/standard/queue/pom.xml +[INFO] ... key=pluginDescriptor = Component Descriptor: role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisCLIPlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:2.5.0:cli' +role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisCreatePlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:2.5.0:create' +role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisDependencyScanPlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:2.5.0:dependency-scan' +role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.activemq.artemis.maven.ArtemisClientPlugin', role hint: 'org.apache.activemq:artemis-maven-plugin:2.5.0:runClient' --- -Executing org.apache.activemq.artemis.cli.commands.Create create --allow-anonymous --silent --force --no-web --user guest --password guest --role guest --port-offset 0 --data ./data --allow-anonymous --no-autotune --verbose /work/apache-artemis-1.1.0/examples/features/standard/queue/target/server0 -Home::/work/apache-artemis-1.1.0/examples/features/standard/queue/../../../.., Instance::. -Creating ActiveMQ Artemis instance at: /work/apache-artemis-1.1.0/examples/features/standard/queue/target/server0 +Executing org.apache.activemq.artemis.cli.commands.Create create --allow-anonymous --silent --force --user guest --password guest --role guest --port-offset 0 --data ./data --allow-anonymous --no-web --no-autotune --verbose --aio /home/user/activemq-artemis/examples/features/standard/queue/target/server0 +Home::/home/user/activemq-artemis/examples/features/standard/queue/../../../../artemis-distribution/target/apache-artemis-2.5.0-bin/apache-artemis-2.5.0, Instance::null +Creating ActiveMQ Artemis instance at: /home/user/activemq-artemis/examples/features/standard/queue/target/server0 You can now start the broker by executing: - "/work/apache-artemis-1.1.0/examples/features/standard/queue/target/server0/bin/artemis" run + "/home/user/activemq-artemis/examples/features/standard/queue/target/server0/bin/artemis" run Or you can run the broker in the background using: - "/work/apache-artemis-1.1.0/examples/features/standard/queue/target/server0/bin/artemis-service" start + "/home/user/activemq-artemis/examples/features/standard/queue/target/server0/bin/artemis-service" start [INFO] ################################################################################################### [INFO] create-server0.sh created with commands to reproduce server0 -[INFO] under /work/apache-artemis-1.1.0/examples/features/standard/queue/target +[INFO] under /home/user/activemq-artemis/examples/features/standard/queue/target [INFO] ################################################################################################### [INFO] -[INFO] --- artemis-maven-plugin:1.1.0:cli (start) @ queue --- -[INFO] awaiting server to start +[INFO] --- artemis-maven-plugin:2.5.0:cli (start) @ queue --- [INFO] awaiting server to start server-out: _ _ _ server-out: / \ ____| |_ ___ __ __(_) _____ server-out: / _ \| _ \ __|/ _ \ \/ | |/ __/ server-out: / ___ \ | \/ |_/ __/ |\/| | |\___ \ server-out: /_/ \_\| \__\____|_| |_|_|/___ / -server-out: Apache ActiveMQ Artemis 1.1.0 +server-out: Apache ActiveMQ Artemis 2.5.0 server-out: server-out: -server-out:17:30:25,091 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server -server-out:17:30:25,120 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging) -server-out:17:30:25,152 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal -server-out:17:30:25,195 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE -server-out:17:30:25,199 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP -server-out:17:30:25,209 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ -server-out:17:30:25,211 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT -server-out:17:30:25,214 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE -server-out:17:30:25,335 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP +server-out:2018-03-13 09:06:37,980 WARN [org.apache.activemq.artemis.core.server] AMQ222018: AIO was not located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal +server-out:2018-03-13 09:06:38,052 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server +[INFO] awaiting server to start +server-out:2018-03-13 09:06:38,123 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging) +server-out:2018-03-13 09:06:38,146 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal +server-out:2018-03-13 09:06:38,178 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1,073,741,824 +server-out:2018-03-13 09:06:38,197 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE +server-out:2018-03-13 09:06:38,198 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP +server-out:2018-03-13 09:06:38,198 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ +server-out:2018-03-13 09:06:38,198 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT +server-out:2018-03-13 09:06:38,199 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE +server-out:2018-03-13 09:06:38,199 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP +server-out:2018-03-13 09:06:38,261 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain live lock +server-out:2018-03-13 09:06:38,262 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Live Server Obtained live lock +server-out:2018-03-13 09:06:38,386 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue DLQ on address DLQ +server-out:2018-03-13 09:06:38,445 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue ExpiryQueue on address ExpiryQueue [INFO] awaiting server to start -server-out:17:30:25,781 INFO [org.apache.activemq.artemis.core.server] AMQ221003: trying to deploy queue jms.queue.DLQ -server-out:17:30:25,835 INFO [org.apache.activemq.artemis.core.server] AMQ221003: trying to deploy queue jms.queue.ExpiryQueue -server-out:17:30:25,933 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE] -server-out:17:30:25,936 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP] -server-out:17:30:25,939 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5672 for protocols [AMQP] -server-out:17:30:25,944 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:1883 for protocols [MQTT] -server-out:17:30:25,948 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:61613 for protocols [STOMP] -server-out:17:30:25,949 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live -server-out:17:30:25,949 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0 [nodeID=a855176b-50f0-11e5-937e-2fe9bb000966] +server-out:2018-03-13 09:06:38,739 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE] +server-out:2018-03-13 09:06:38,741 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP] +server-out:2018-03-13 09:06:38,742 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5672 for protocols [AMQP] +server-out:2018-03-13 09:06:38,744 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:1883 for protocols [MQTT] +server-out:2018-03-13 09:06:38,746 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61613 for protocols [STOMP] +server-out:2018-03-13 09:06:38,752 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live +server-out:2018-03-13 09:06:38,752 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.5.0 [0.0.0.0, nodeID=bf1853a1-26c7-11e8-9378-d96702a756ed] [INFO] Server started [INFO] -[INFO] --- artemis-maven-plugin:1.1.0:runClient (runClient) @ queue --- +[INFO] --- artemis-maven-plugin:2.5.0:runClient (runClient) @ queue --- Sent message: This is a text message Received message: This is a text message [INFO] -[INFO] --- artemis-maven-plugin:1.1.0:cli (stop) @ queue --- -server-out:17:30:27,476 INFO [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 1.0.1-SNA +[INFO] --- artemis-maven-plugin:2.5.0:cli (stop) @ queue --- +server-out:2018-03-13 09:06:40,888 INFO [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 2.5.0 [bf1853a1-26c7-11e8-9378-d96702a756ed] stopped, uptime 2.786 seconds +server-out:Server stopped! [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ -[INFO] Total time: 7.840 s -[INFO] Finished at: 2015-09-01T17:30:27-04:00 -[INFO] Final Memory: 42M/508M +[INFO] Total time: 6.641 s +[INFO] Finished at: 2018-03-13T09:06:40-05:00 +[INFO] Final Memory: 43M/600M [INFO] ------------------------------------------------------------------------ ``` -List -==== - -This includes a preview list of a few examples that we distribute with Artemis. Please refer to the distribution for a more accurate list. +This includes a preview list of a few examples that we distribute with Artemis. +Please refer to the distribution for a more accurate list. -Applet ------- +## Applet This example shows you how to send and receive JMS messages from an Applet. -Application-Layer Failover --------------------------- +## Application-Layer Failover -Apache ActiveMQ Artemis also supports Application-Layer failover, useful in the case -that replication is not enabled on the server side. +Apache ActiveMQ Artemis also supports Application-Layer failover, useful in the +case that replication is not enabled on the server side. -With Application-Layer failover, it's up to the application to register -a JMS `ExceptionListener` with Apache ActiveMQ Artemis which will be called by Apache ActiveMQ Artemis -in the event that connection failure is detected. +With Application-Layer failover, it's up to the application to register a JMS +`ExceptionListener` with Apache ActiveMQ Artemis which will be called by Apache +ActiveMQ Artemis in the event that connection failure is detected. -The code in the `ExceptionListener` then recreates the JMS connection, -session, etc on another node and the application can continue. +The code in the `ExceptionListener` then recreates the JMS connection, session, +etc on another node and the application can continue. -Application-layer failover is an alternative approach to High -Availability (HA). Application-layer failover differs from automatic -failover in that some client side coding is required in order to -implement this. Also, with Application-layer failover, since the old -session object dies and a new one is created, any uncommitted work in -the old session will be lost, and any unacknowledged messages might be -redelivered. +Application-layer failover is an alternative approach to High Availability +(HA). Application-layer failover differs from automatic failover in that some +client side coding is required in order to implement this. Also, with +Application-layer failover, since the old session object dies and a new one is +created, any uncommitted work in the old session will be lost, and any +unacknowledged messages might be redelivered. -Core Bridge Example -------------------- +## Core Bridge Example -The `bridge` example demonstrates a core bridge deployed on one server, -which consumes messages from a local queue and forwards them to an -address on a second server. +The `bridge` example demonstrates a core bridge deployed on one server, which +consumes messages from a local queue and forwards them to an address on a +second server. -Core bridges are used to create message flows between any two Apache ActiveMQ Artemis -servers which are remotely separated. Core bridges are resilient and -will cope with temporary connection failure allowing them to be an ideal -choice for forwarding over unreliable connections, e.g. a WAN. +Core bridges are used to create message flows between any two Apache ActiveMQ +Artemis servers which are remotely separated. Core bridges are resilient and +will cope with temporary connection failure allowing them to be an ideal choice +for forwarding over unreliable connections, e.g. a WAN. -Browser -------- +## Browser -The `browser` example shows you how to use a JMS `QueueBrowser` with -Apache ActiveMQ Artemis. +The `browser` example shows you how to use a JMS `QueueBrowser` with Apache +ActiveMQ Artemis. -Queues are a standard part of JMS, please consult the JMS 2.0 -specification for full details. +Queues are a standard part of JMS, please consult the JMS 2.0 specification for +full details. -A `QueueBrowser` is used to look at messages on the queue without -removing them. It can scan the entire content of a queue or only -messages matching a message selector. +A `QueueBrowser` is used to look at messages on the queue without removing +them. It can scan the entire content of a queue or only messages matching a +message selector. -Client Kickoff --------------- +## Client Kickoff -The `client-kickoff` example shows how to terminate client connections -given an IP address using the JMX management API. +The `client-kickoff` example shows how to terminate client connections given an +IP address using the JMX management API. -Client side failover listener ------------------------------ +## Client side failover listener -The `client-side-failoverlistener` example shows how to register a -listener to monitor failover events +The `client-side-failoverlistener` example shows how to register a listener to +monitor failover events -Client-Side Load-Balancing --------------------------- +## Client-Side Load-Balancing -The `client-side-load-balancing` example demonstrates how sessions -created from a single JMS `Connection` can be created to different nodes -of the cluster. In other words it demonstrates how Apache ActiveMQ Artemis does -client-side load-balancing of sessions across the cluster. +The `client-side-load-balancing` example demonstrates how sessions created from +a single JMS `Connection` can be created to different nodes of the cluster. In +other words it demonstrates how Apache ActiveMQ Artemis does client-side +load-balancing of sessions across the cluster. -Clustered Durable Subscription ------------------------------- +## Clustered Durable Subscription This example demonstrates a clustered JMS durable subscription -Clustered Grouping ------------------- +## Clustered Grouping -This is similar to the message grouping example except that it -demonstrates it working over a cluster. Messages sent to different nodes -with the same group id will be sent to the same node and the same -consumer. +This is similar to the message grouping example except that it demonstrates it +working over a cluster. Messages sent to different nodes with the same group id +will be sent to the same node and the same consumer. -Clustered Queue ---------------- +## Clustered Queue -The `clustered-queue` example demonstrates a queue deployed on two -different nodes. The two nodes are configured to form a cluster. We then -create a consumer for the queue on each node, and we create a producer -on only one of the nodes. We then send some messages via the producer, -and we verify that both consumers receive the sent messages in a -round-robin fashion. +The `clustered-queue` example demonstrates a queue deployed on two different +nodes. The two nodes are configured to form a cluster. We then create a +consumer for the queue on each node, and we create a producer on only one of +the nodes. We then send some messages via the producer, and we verify that both +consumers receive the sent messages in a round-robin fashion. -Clustering with JGroups ------------------------ +## Clustering with JGroups -The `clustered-jgroups` example demonstrates how to form a two node -cluster using JGroups as its underlying topology discovery technique, -rather than the default UDP broadcasting. We then create a consumer for -the queue on each node, and we create a producer on only one of the -nodes. We then send some messages via the producer, and we verify that -both consumers receive the sent messages in a round-robin fashion. +The `clustered-jgroups` example demonstrates how to form a two node cluster +using JGroups as its underlying topology discovery technique, rather than the +default UDP broadcasting. We then create a consumer for the queue on each node, +and we create a producer on only one of the nodes. We then send some messages +via the producer, and we verify that both consumers receive the sent messages +in a round-robin fashion. -Clustered Standalone --------------------- +## Clustered Standalone -The `clustered-standalone` example demonstrates how to configure and -starts 3 cluster nodes on the same machine to form a cluster. A -subscriber for a JMS topic is created on each node, and we create a -producer on only one of the nodes. We then send some messages via the -producer, and we verify that the 3 subscribers receive all the sent -messages. +The `clustered-standalone` example demonstrates how to configure and starts 3 +cluster nodes on the same machine to form a cluster. A subscriber for a JMS +topic is created on each node, and we create a producer on only one of the +nodes. We then send some messages via the producer, and we verify that the 3 +subscribers receive all the sent messages. -Clustered Static Discovery --------------------------- +## Clustered Static Discovery -This example demonstrates how to configure a cluster using a list of -connectors rather than UDP for discovery +This example demonstrates how to configure a cluster using a list of connectors +rather than UDP for discovery -Clustered Static Cluster One Way --------------------------------- +## Clustered Static Cluster One Way -This example demonstrates how to set up a cluster where cluster -connections are one way, i.e. server A -\> Server B -\> Server C +This example demonstrates how to set up a cluster where cluster connections are +one way, i.e. server A -\> Server B -\> Server C -Clustered Topic ---------------- +## Clustered Topic The `clustered-topic` example demonstrates a JMS topic deployed on two -different nodes. The two nodes are configured to form a cluster. We then -create a subscriber on the topic on each node, and we create a producer -on only one of the nodes. We then send some messages via the producer, -and we verify that both subscribers receive all the sent messages. +different nodes. The two nodes are configured to form a cluster. We then create +a subscriber on the topic on each node, and we create a producer on only one of +the nodes. We then send some messages via the producer, and we verify that both +subscribers receive all the sent messages. -Message Consumer Rate Limiting ------------------------------- +## Message Consumer Rate Limiting -With Apache ActiveMQ Artemis you can specify a maximum consume rate at which a JMS -MessageConsumer will consume messages. This can be specified when -creating or deploying the connection factory. +With Apache ActiveMQ Artemis you can specify a maximum consume rate at which a +JMS MessageConsumer will consume messages. This can be specified when creating +or deploying the connection factory. -If this value is specified then Apache ActiveMQ Artemis will ensure that messages are -never consumed at a rate higher than the specified rate. This is a form -of consumer throttling. +If this value is specified then Apache ActiveMQ Artemis will ensure that +messages are never consumed at a rate higher than the specified rate. This is a +form of consumer throttling. -Dead Letter ------------ +## Dead Letter -The `dead-letter` example shows you how to define and deal with dead -letter messages. Messages can be delivered unsuccessfully (e.g. if the -transacted session used to consume them is rolled back). +The `dead-letter` example shows you how to define and deal with dead letter +messages. Messages can be delivered unsuccessfully (e.g. if the transacted +session used to consume them is rolled back). Such a message goes back to the JMS destination ready to be redelivered. -However, this means it is possible for a message to be delivered again -and again without any success and remain in the destination, clogging -the system. +However, this means it is possible for a message to be delivered again and +again without any success and remain in the destination, clogging the system. To prevent this, messaging systems define dead letter messages: after a -specified unsuccessful delivery attempts, the message is removed from -the destination and put instead in a dead letter destination where they -can be consumed for further investigation. +specified unsuccessful delivery attempts, the message is removed from the +destination and put instead in a dead letter destination where they can be +consumed for further investigation. -Delayed Redelivery ------------------- +## Delayed Redelivery -The `delayed-redelivery` example demonstrates how Apache ActiveMQ Artemis can be -configured to provide a delayed redelivery in the case a message needs -to be redelivered. +The `delayed-redelivery` example demonstrates how Apache ActiveMQ Artemis can +be configured to provide a delayed redelivery in the case a message needs to be +redelivered. -Delaying redelivery can often be useful in the case that clients -regularly fail or roll-back. Without a delayed redelivery, the system -can get into a "thrashing" state, with delivery being attempted, the -client rolling back, and delivery being re-attempted in quick -succession, using up valuable CPU and network resources. +Delaying redelivery can often be useful in the case that clients regularly fail +or roll-back. Without a delayed redelivery, the system can get into a +"thrashing" state, with delivery being attempted, the client rolling back, and +delivery being re-attempted in quick succession, using up valuable CPU and +network resources. -Divert ------- +## Divert -Apache ActiveMQ Artemis diverts allow messages to be transparently "diverted" or copied -from one address to another with just some simple configuration defined -on the server side. +Apache ActiveMQ Artemis diverts allow messages to be transparently "diverted" +or copied from one address to another with just some simple configuration +defined on the server side. -Durable Subscription --------------------- +## Durable Subscription -The `durable-subscription` example shows you how to use a durable -subscription with Apache ActiveMQ Artemis. Durable subscriptions are a standard part of -JMS, please consult the JMS 1.1 specification for full details. +The `durable-subscription` example shows you how to use a durable subscription +with Apache ActiveMQ Artemis. Durable subscriptions are a standard part of JMS, +please consult the JMS 1.1 specification for full details. -Unlike non-durable subscriptions, the key function of durable -subscriptions is that the messages contained in them persist longer than -the lifetime of the subscriber - i.e. they will accumulate messages sent -to the topic even if there is no active subscriber on them. They will -also survive server restarts or crashes. Note that for the messages to -be persisted, the messages sent to them must be marked as durable -messages. +Unlike non-durable subscriptions, the key function of durable subscriptions is +that the messages contained in them persist longer than the lifetime of the +subscriber - i.e. they will accumulate messages sent to the topic even if there +is no active subscriber on them. They will also survive server restarts or +crashes. Note that for the messages to be persisted, the messages sent to them +must be marked as durable messages. -Embedded --------- +## Embedded The `embedded` example shows how to embed a broker within your own code using POJO instantiation and no config files. -Embedded Simple ---------------- +## Embedded Simple The `embedded-simple` example shows how to embed a broker within your own code using regular Apache ActiveMQ Artemis XML files. -Exclusive Queue ---------------- +## Exclusive Queue -The `exlusive-queue` example shows you how to use Exclusive Queues, that -route all messages to only one consumer at a time. +The `exlusive-queue` example shows you how to use exclusive queues, that route +all messages to only one consumer at a time. -Message Expiration ------------------- +## Message Expiration -The `expiry` example shows you how to define and deal with message -expiration. Messages can be retained in the messaging system for a -limited period of time before being removed. JMS specification states -that clients should not receive messages that have been expired (but it -does not guarantee this will not happen). +The `expiry` example shows you how to define and deal with message expiration. +Messages can be retained in the messaging system for a limited period of time +before being removed. JMS specification states that clients should not receive +messages that have been expired (but it does not guarantee this will not +happen). -Apache ActiveMQ Artemis can assign an expiry address to a given queue so that when -messages are expired, they are removed from the queue and sent to the -expiry address. These "expired" messages can later be consumed from the -expiry address for further inspection. +Apache ActiveMQ Artemis can assign an expiry address to a given queue so that +when messages are expired, they are removed from the queue and sent to the +expiry address. These "expired" messages can later be consumed from the expiry +address for further inspection. -Apache ActiveMQ Artemis Resource Adapter example ---------------------------------- +## Apache ActiveMQ Artemis Resource Adapter example -This examples shows how to build the activemq resource adapters a rar -for deployment in other Application Server's +This examples shows how to build the activemq resource adapters a rar for +deployment in other Application Server's -HTTP Transport --------------- +## HTTP Transport -The `http-transport` example shows you how to configure Apache ActiveMQ Artemis to use -the HTTP protocol as its transport layer. +The `http-transport` example shows you how to configure Apache ActiveMQ Artemis +to use the HTTP protocol as its transport layer. -Instantiate JMS Objects Directly --------------------------------- +## Instantiate JMS Objects Directly -Usually, JMS Objects such as `ConnectionFactory`, `Queue` and `Topic` -instances are looked up from JNDI before being used by the client code. -This objects are called "administered objects" in JMS terminology. +Usually, JMS Objects such as `ConnectionFactory`, `Queue` and `Topic` instances +are looked up from JNDI before being used by the client code. This objects are +called "administered objects" in JMS terminology. -However, in some cases a JNDI server may not be available or desired. To -come to the rescue Apache ActiveMQ Artemis also supports the direct instantiation of -these administered objects on the client side so you don't have to use -JNDI for JMS. +However, in some cases a JNDI server may not be available or desired. To come +to the rescue Apache ActiveMQ Artemis also supports the direct instantiation of +these administered objects on the client side so you don't have to use JNDI for +JMS. -Interceptor ------------ +## Interceptor -Apache ActiveMQ Artemis allows an application to use an interceptor to hook into the -messaging system. Interceptors allow you to handle various message +Apache ActiveMQ Artemis allows an application to use an interceptor to hook +into the messaging system. Interceptors allow you to handle various message events in Apache ActiveMQ Artemis. -JAAS ----- +## Interceptor AMQP -The `jaas` example shows you how to configure Apache ActiveMQ Artemis to use JAAS for -security. Apache ActiveMQ Artemis can leverage JAAS to delegate user authentication and -authorization to existing security infrastructure. +Similar to the [Interceptor](#interceptor) example, but using AMQP interceptors. -JMS Auto Closable ------------------ +## Interceptor Client -The `jms-auto-closeable` example shows how JMS resources, such as -connections, sessions and consumers, in JMS 2 can be automatically -closed on error. +Similar to the [Interceptor](#interceptor) example, but using interceptors on +the **client** rather than the broker. -JMS Completion Listener ------------------------ +## Interceptor MQTT + +Similar to the [Interceptor](#interceptor) example, but using MQTT interceptors. + +## JAAS + +The `jaas` example shows you how to configure Apache ActiveMQ Artemis to use +JAAS for security. Apache ActiveMQ Artemis can leverage JAAS to delegate user +authentication and authorization to existing security infrastructure. + +## JMS Auto Closable + +The `jms-auto-closeable` example shows how JMS resources, such as connections, +sessions and consumers, in JMS 2 can be automatically closed on error. + +## JMS Completion Listener The `jms-completion-listener` example shows how to send a message -asynchronously to Apache ActiveMQ Artemis and use a CompletionListener to be notified -of the Broker receiving it. +asynchronously to Apache ActiveMQ Artemis and use a CompletionListener to be +notified of the Broker receiving it. -JMS Bridge ----------- +## JMS Bridge -The `jms-bridge` example shows how to setup a bridge between two -standalone Apache ActiveMQ Artemis servers. +The `jms-bridge` example shows how to setup a bridge between two standalone +Apache ActiveMQ Artemis servers. -JMS Context ------------ +## JMS Context The `jms-context` example shows how to send and receive a message to/from an address/queue using Apache ActiveMQ Artemis by using a JMS Context. -A JMSContext is part of JMS 2.0 and combines the JMS Connection and -Session Objects into a simple Interface. +A JMSContext is part of JMS 2.0 and combines the JMS Connection and Session +Objects into a simple Interface. -JMS Shared Consumer -------------------- +## JMS Shared Consumer -The `jms-shared-consumer` example shows you how can use shared consumers -to share a subscription on a topic. In JMS 1.1 this was not allowed and -so caused a scalability issue. In JMS 2 this restriction has been lifted -so you can share the load across different threads and connections. +The `jms-shared-consumer` example shows you how can use shared consumers to +share a subscription on a topic. In JMS 1.1 this was not allowed and so caused +a scalability issue. In JMS 2 this restriction has been lifted so you can share +the load across different threads and connections. -JMX Management --------------- +## JMX Management The `jmx` example shows how to manage Apache ActiveMQ Artemis using JMX. -Large Message -------------- +## Large Message The `large-message` example shows you how to send and receive very large -messages with Apache ActiveMQ Artemis. Apache ActiveMQ Artemis supports the sending and receiving of -huge messages, much larger than can fit in available RAM on the client -or server. Effectively the only limit to message size is the amount of -disk space you have on the server. +messages with Apache ActiveMQ Artemis. Apache ActiveMQ Artemis supports the +sending and receiving of huge messages, much larger than can fit in available +RAM on the client or server. Effectively the only limit to message size is the +amount of disk space you have on the server. Large messages are persisted on the server so they can survive a server -restart. In other words Apache ActiveMQ Artemis doesn't just do a simple socket stream -from the sender to the consumer. +restart. In other words Apache ActiveMQ Artemis doesn't just do a simple socket +stream from the sender to the consumer. -Last-Value Queue ----------------- +## Last-Value Queue -The `last-value-queue` example shows you how to define and deal with -last-value queues. Last-value queues are special queues which discard -any messages when a newer message with the same value for a well-defined -last-value property is put in the queue. In other words, a last-value -queue only retains the last value. +The `last-value-queue` example shows you how to define and deal with last-value +queues. Last-value queues are special queues which discard any messages when a +newer message with the same value for a well-defined last-value property is put +in the queue. In other words, a last-value queue only retains the last value. -A typical example for last-value queue is for stock prices, where you -are only interested by the latest price for a particular stock. +A typical example for last-value queue is for stock prices, where you are only +interested by the latest price for a particular stock. -Management ----------- +## Management -The `management` example shows how to manage Apache ActiveMQ Artemis using JMS Messages -to invoke management operations on the server. +The `management` example shows how to manage Apache ActiveMQ Artemis using JMS +Messages to invoke management operations on the server. -Management Notification ------------------------ +## Management Notification The `management-notification` example shows how to receive management -notifications from Apache ActiveMQ Artemis using JMS messages. Apache ActiveMQ Artemis servers emit -management notifications when events of interest occur (consumers are -created or closed, addresses are created or deleted, security +notifications from Apache ActiveMQ Artemis using JMS messages. Apache ActiveMQ +Artemis servers emit management notifications when events of interest occur +(consumers are created or closed, addresses are created or deleted, security authentication fails, etc.). -Message Counter ---------------- +## Message Counter -The `message-counters` example shows you how to use message counters to -obtain message information for a queue. +The `message-counters` example shows you how to use message counters to obtain +message information for a queue. -Message Group -------------- +## Message Group -The `message-group` example shows you how to configure and use message -groups with Apache ActiveMQ Artemis. Message groups allow you to pin messages so they -are only consumed by a single consumer. Message groups are sets of -messages that has the following characteristics: +The `message-group` example shows you how to configure and use message groups +with Apache ActiveMQ Artemis. Message groups allow you to pin messages so they +are only consumed by a single consumer. Message groups are sets of messages +that has the following characteristics: -- Messages in a message group share the same group id, i.e. they have - same JMSXGroupID string property values +- Messages in a message group share the same group id, i.e. they have same + JMSXGroupID string property values -- The consumer that receives the first message of a group will receive - all the messages that belongs to the group +- The consumer that receives the first message of a group will receive all the + messages that belongs to the group -Message Group -------------- +## Message Group -The `message-group2` example shows you how to configure and use message -groups with Apache ActiveMQ Artemis via a connection factory. +The `message-group2` example shows you how to configure and use message groups +with Apache ActiveMQ Artemis via a connection factory. -Message Priority ----------------- +## Message Priority -Message Priority can be used to influence the delivery order for -messages. +Message Priority can be used to influence the delivery order for messages. -It can be retrieved by the message's standard header field 'JMSPriority' -as defined in JMS specification version 1.1. +It can be retrieved by the message's standard header field 'JMSPriority' as +defined in JMS specification version 1.1. -The value is of type integer, ranging from 0 (the lowest) to 9 (the -highest). When messages are being delivered, their priorities will -effect their order of delivery. Messages of higher priorities will -likely be delivered before those of lower priorities. +The value is of type integer, ranging from 0 (the lowest) to 9 (the highest). +When messages are being delivered, their priorities will effect their order of +delivery. Messages of higher priorities will likely be delivered before those +of lower priorities. Messages of equal priorities are delivered in the natural order of their -arrival at their destinations. Please consult the JMS 1.1 specification -for full details. +arrival at their destinations. Please consult the JMS 1.1 specification for +full details. -Multiple Failover ------------------ +## Multiple Failover -This example demonstrates how to set up a live server with multiple -backups +This example demonstrates how to set up a live server with multiple backups -Multiple Failover Failback --------------------------- +## Multiple Failover Failback -This example demonstrates how to set up a live server with multiple -backups but forcing failover back to the original live server +This example demonstrates how to set up a live server with multiple backups but +forcing failover back to the original live server -No Consumer Buffering ---------------------- +## No Consumer Buffering -By default, Apache ActiveMQ Artemis consumers buffer messages from the server in a -client side buffer before you actually receive them on the client side. -This improves performance since otherwise every time you called -receive() or had processed the last message in a -`MessageListener onMessage()` method, the Apache ActiveMQ Artemis client would have to -go the server to request the next message, which would then get sent to -the client side, if one was available. +By default, Apache ActiveMQ Artemis consumers buffer messages from the server +in a client side buffer before you actually receive them on the client side. +This improves performance since otherwise every time you called receive() or +had processed the last message in a `MessageListener onMessage()` method, the +Apache ActiveMQ Artemis client would have to go the server to request the next +message, which would then get sent to the client side, if one was available. This would involve a network round trip for every message and reduce -performance. Therefore, by default, Apache ActiveMQ Artemis pre-fetches messages into a -buffer on each consumer. +performance. Therefore, by default, Apache ActiveMQ Artemis pre-fetches +messages into a buffer on each consumer. -In some case buffering is not desirable, and Apache ActiveMQ Artemis allows it to be -switched off. This example demonstrates that. +In some case buffering is not desirable, and Apache ActiveMQ Artemis allows it +to be switched off. This example demonstrates that. -Non-Transaction Failover With Server Data Replication ------------------------------------------------------ +## Non-Transaction Failover With Server Data Replication -The `non-transaction-failover` example demonstrates two servers coupled -as a live-backup pair for high availability (HA), and a client using a -*non-transacted* JMS session failing over from live to backup when the -live server is crashed. +The `non-transaction-failover` example demonstrates two servers coupled as a +live-backup pair for high availability (HA), and a client using a +*non-transacted* JMS session failing over from live to backup when the live +server is crashed. -Apache ActiveMQ Artemis implements failover of client connections between live and -backup servers. This is implemented by the replication of state between -live and backup nodes. When replication is configured and a live node -crashes, the client connections can carry and continue to send and -consume messages. When non-transacted sessions are used, once and only -once message delivery is not guaranteed and it is possible that some -messages will be lost or delivered twice. +Apache ActiveMQ Artemis implements failover of client connections between live +and backup servers. This is implemented by the replication of state between +live and backup nodes. When replication is configured and a live node crashes, +the client connections can carry and continue to send and consume messages. +When non-transacted sessions are used, once and only once message delivery is +not guaranteed and it is possible that some messages will be lost or delivered +twice. -OpenWire --------- +## OpenWire -The `Openwire` example shows how to configure an Apache ActiveMQ Artemis server to -communicate with an Apache ActiveMQ Artemis JMS client that uses open-wire protocol. +The `Openwire` example shows how to configure an Apache ActiveMQ Artemis server +to communicate with an Apache ActiveMQ Artemis JMS client that uses open-wire +protocol. You will find the queue example for open wire, and the chat example. The virtual-topic-mapping examples shows how to map the ActiveMQ 5.x Virtual Topic naming convention to work with the Artemis Address model. -Paging ------- +## Paging -The `paging` example shows how Apache ActiveMQ Artemis can support huge queues even -when the server is running in limited RAM. It does this by transparently +The `paging` example shows how Apache ActiveMQ Artemis can support huge queues +even when the server is running in limited RAM. It does this by transparently *paging* messages to disk, and *depaging* them when they are required. -Pre-Acknowledge ---------------- +## Pre-Acknowledge -Standard JMS supports three acknowledgement modes:` - AUTO_ACKNOWLEDGE`, `CLIENT_ACKNOWLEDGE`, and -`DUPS_OK_ACKNOWLEDGE`. For a full description on these modes please -consult the JMS specification, or any JMS tutorial. +Standard JMS supports three acknowledgement modes:` AUTO_ACKNOWLEDGE`, +`CLIENT_ACKNOWLEDGE`, and `DUPS_OK_ACKNOWLEDGE`. For a full description on +these modes please consult the JMS specification, or any JMS tutorial. -All of these standard modes involve sending acknowledgements from the -client to the server. However in some cases, you really don't mind -losing messages in event of failure, so it would make sense to -acknowledge the message on the server before delivering it to the -client. This example demonstrates how Apache ActiveMQ Artemis allows this with an extra -acknowledgement mode. +All of these standard modes involve sending acknowledgements from the client to +the server. However in some cases, you really don't mind losing messages in +event of failure, so it would make sense to acknowledge the message on the +server before delivering it to the client. This example demonstrates how Apache +ActiveMQ Artemis allows this with an extra acknowledgement mode. -Message Producer Rate Limiting ------------------------------- +## Message Producer Rate Limiting -The `producer-rte-limit` example demonstrates how, with Apache ActiveMQ Artemis, you -can specify a maximum send rate at which a JMS message producer will -send messages. +The `producer-rte-limit` example demonstrates how, with Apache ActiveMQ +Artemis, you can specify a maximum send rate at which a JMS message producer +will send messages. -Queue ------ +## Queue A simple example demonstrating a queue. -Message Redistribution ----------------------- +## Message Redistribution -The `queue-message-redistribution` example demonstrates message -redistribution between queues with the same name deployed in different -nodes of a cluster. +The `queue-message-redistribution` example demonstrates message redistribution +between queues with the same name deployed in different nodes of a cluster. -Queue Requestor ---------------- +## Queue Requestor A simple example demonstrating a JMS queue requestor. -Queue with Message Selector ---------------------------- +## Queue with Message Selector -The `queue-selector` example shows you how to selectively consume -messages using message selectors with queue consumers. +The `queue-selector` example shows you how to selectively consume messages +using message selectors with queue consumers. -Reattach Node example ---------------------- +## Reattach Node example -The `Reattach Node` example shows how a client can try to reconnect to -the same server instead of failing the connection immediately and -notifying any user ExceptionListener objects. Apache ActiveMQ Artemis can be configured -to automatically retry the connection, and reattach to the server when -it becomes available again across the network. +The `Reattach Node` example shows how a client can try to reconnect to the same +server instead of failing the connection immediately and notifying any user +ExceptionListener objects. Apache ActiveMQ Artemis can be configured to +automatically retry the connection, and reattach to the server when it becomes +available again across the network. -Replicated Failback example ---------------------------- +## Replicated Failback example -An example showing how failback works when using replication, In this -example a live server will replicate all its Journal to a backup server -as it updates it. When the live server crashes the backup takes over -from the live server and the client reconnects and carries on from where -it left off. +An example showing how failback works when using replication, In this example a +live server will replicate all its Journal to a backup server as it updates it. +When the live server crashes the backup takes over from the live server and the +client reconnects and carries on from where it left off. -Replicated Failback static example ----------------------------------- +## Replicated Failback static example -An example showing how failback works when using replication, but this -time with static connectors +An example showing how failback works when using replication, but this time +with static connectors -Replicated multiple failover example ------------------------------------- +## Replicated multiple failover example -An example showing how to configure multiple backups when using -replication +An example showing how to configure multiple backups when using replication -Replicated Failover transaction example ---------------------------------------- +## Replicated Failover transaction example -An example showing how failover works with a transaction when using -replication +An example showing how failover works with a transaction when using replication -Request-Reply example ---------------------- +## Request-Reply example A simple example showing the JMS request-response pattern. -Scheduled Message ------------------ +## Scheduled Message -The `scheduled-message` example shows you how to send a scheduled -message to an address/queue with Apache ActiveMQ Artemis. Scheduled messages won't get +The `scheduled-message` example shows you how to send a scheduled message to an +address/queue with Apache ActiveMQ Artemis. Scheduled messages won't get delivered until a specified time in the future. -Security --------- +## Security The `security` example shows you how configure and use role based queue security with Apache ActiveMQ Artemis. -Send Acknowledgements ---------------------- +## Send Acknowledgements -The `send-acknowledgements` example shows you how to use Apache ActiveMQ Artemis's -advanced *asynchronous send acknowledgements* feature to obtain -acknowledgement from the server that sends have been received and -processed in a separate stream to the sent messages. +The `send-acknowledgements` example shows you how to use Apache ActiveMQ +Artemis's advanced *asynchronous send acknowledgements* feature to obtain +acknowledgement from the server that sends have been received and processed in +a separate stream to the sent messages. -Slow Consumer -------------- +## Slow Consumer -The `slow-consumer` example shows you how to detect slow consumers and configure -a slow consumer policy in Apache ActiveMQ Artemis's +The `slow-consumer` example shows you how to detect slow consumers and +configure a slow consumer policy in Apache ActiveMQ Artemis's -Spring Integration ------------------- +## Spring Integration -This example shows how to use embedded JMS using Apache ActiveMQ Artemis's Spring -integration. +This example shows how to use embedded JMS using Apache ActiveMQ Artemis's +Spring integration. -SSL Transport -------------- +## SSL Transport -The `ssl-enabled` shows you how to configure SSL with Apache ActiveMQ Artemis to send -and receive message. +The `ssl-enabled` shows you how to configure SSL with Apache ActiveMQ Artemis +to send and receive message. -Static Message Selector ------------------------ +## Static Message Selector -The `static-selector` example shows you how to configure an Apache ActiveMQ Artemis core -queue with static message selectors (filters). +The `static-selector` example shows you how to configure an Apache ActiveMQ +Artemis core queue with static message selectors (filters). -Static Message Selector Using JMS ---------------------------------- +## Static Message Selector Using JMS -The `static-selector-jms` example shows you how to configure an Apache ActiveMQ Artemis -queue with static message selectors (filters) using JMS. +The `static-selector-jms` example shows you how to configure an Apache ActiveMQ +Artemis queue with static message selectors (filters) using JMS. -Stomp ------ +## Stomp -The `stomp` example shows you how to configure an Apache ActiveMQ Artemis server to send -and receive Stomp messages. +The `stomp` example shows you how to configure an Apache ActiveMQ Artemis +server to send and receive Stomp messages. -Stomp1.1 --------- +## Stomp1.1 -The `stomp` example shows you how to configure an Apache ActiveMQ Artemis server to send -and receive Stomp messages via a Stomp 1.1 connection. +The `stomp` example shows you how to configure an Apache ActiveMQ Artemis +server to send and receive Stomp messages via a Stomp 1.1 connection. -Stomp1.2 --------- +## Stomp1.2 -The `stomp` example shows you how to configure an Apache ActiveMQ Artemis server to send -and receive Stomp messages via a Stomp 1.2 connection. +The `stomp` example shows you how to configure an Apache ActiveMQ Artemis +server to send and receive Stomp messages via a Stomp 1.2 connection. -Stomp Over Web Sockets ----------------------- +## Stomp Over Web Sockets -The `stomp-websockets` example shows you how to configure an Apache ActiveMQ Artemis -server to send and receive Stomp messages directly from Web browsers +The `stomp-websockets` example shows you how to configure an Apache ActiveMQ +Artemis server to send and receive Stomp messages directly from Web browsers (provided they support Web Sockets). -Symmetric Cluster ------------------ +## Symmetric Cluster -The `symmetric-cluster` example demonstrates a symmetric cluster set-up -with Apache ActiveMQ Artemis. +The `symmetric-cluster` example demonstrates a symmetric cluster set-up with +Apache ActiveMQ Artemis. -Apache ActiveMQ Artemis has extremely flexible clustering which allows you to set-up -servers in many different topologies. The most common topology that +Apache ActiveMQ Artemis has extremely flexible clustering which allows you to +set-up servers in many different topologies. The most common topology that you'll perhaps be familiar with if you are used to application server clustering is a symmetric cluster. With a symmetric cluster, the cluster is homogeneous, i.e. each node is -configured the same as every other node, and every node is connected to -every other node in the cluster. +configured the same as every other node, and every node is connected to every +other node in the cluster. -Temporary Queue ---------------- +## Temporary Queue A simple example demonstrating how to use a JMS temporary queue. -Topic ------ +## Topic A simple example demonstrating a JMS topic. -Topic Hierarchy ---------------- +## Topic Hierarchy -Apache ActiveMQ Artemis supports topic hierarchies. With a topic hierarchy you can -register a subscriber with a wild-card and that subscriber will receive -any messages sent to an address that matches the wild card. +Apache ActiveMQ Artemis supports topic hierarchies. With a topic hierarchy you +can register a subscriber with a wild-card and that subscriber will receive any +messages sent to an address that matches the wild card. -Topic Selector 1 ----------------- +## Topic Selector 1 -The `topic-selector-example1` example shows you how to send message to a -JMS Topic, and subscribe them using selectors with Apache ActiveMQ Artemis. +The `topic-selector-example1` example shows you how to send message to a JMS +Topic, and subscribe them using selectors with Apache ActiveMQ Artemis. -Topic Selector 2 ----------------- +## Topic Selector 2 -The `topic-selector-example2` example shows you how to selectively -consume messages using message selectors with topic consumers. +The `topic-selector-example2` example shows you how to selectively consume +messages using message selectors with topic consumers. -Transaction Failover --------------------- +## Transaction Failover The `transaction-failover` example demonstrates two servers coupled as a -live-backup pair for high availability (HA), and a client using a -transacted JMS session failing over from live to backup when the live -server is crashed. +live-backup pair for high availability (HA), and a client using a transacted +JMS session failing over from live to backup when the live server is crashed. -Apache ActiveMQ Artemis implements failover of client connections between live and -backup servers. This is implemented by the sharing of a journal between -the servers. When a live node crashes, the client connections can carry -and continue to send and consume messages. When transacted sessions are -used, once and only once message delivery is guaranteed. +Apache ActiveMQ Artemis implements failover of client connections between live +and backup servers. This is implemented by the sharing of a journal between the +servers. When a live node crashes, the client connections can carry and +continue to send and consume messages. When transacted sessions are used, once +and only once message delivery is guaranteed. -Failover Without Transactions ------------------------------ +## Failover Without Transactions -The `stop-server-failover` example demonstrates failover of the JMS -connection from one node to another when the live server crashes using a -JMS non-transacted session. +The `stop-server-failover` example demonstrates failover of the JMS connection +from one node to another when the live server crashes using a JMS +non-transacted session. -Transactional Session ---------------------- +## Transactional Session -The `transactional` example shows you how to use a transactional Session -with Apache ActiveMQ Artemis. +The `transactional` example shows you how to use a transactional Session with +Apache ActiveMQ Artemis. -XA Heuristic ------------- +## XA Heuristic -The `xa-heuristic` example shows you how to make an XA heuristic -decision through Apache ActiveMQ Artemis Management Interface. A heuristic decision is -a unilateral decision to commit or rollback an XA transaction branch -after it has been prepared. +The `xa-heuristic` example shows you how to make an XA heuristic decision +through Apache ActiveMQ Artemis Management Interface. A heuristic decision is a +unilateral decision to commit or rollback an XA transaction branch after it has +been prepared. -XA Receive ----------- +## XA Receive -The `xa-receive` example shows you how message receiving behaves in an -XA transaction in Apache ActiveMQ Artemis. +The `xa-receive` example shows you how message receiving behaves in an XA +transaction in Apache ActiveMQ Artemis. -XA Send -------- +## XA Send The `xa-send` example shows you how message sending behaves in an XA transaction in Apache ActiveMQ Artemis. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/exclusive-queues.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/exclusive-queues.md b/docs/user-manual/en/exclusive-queues.md index 3dc751c..7e086ea 100644 --- a/docs/user-manual/en/exclusive-queues.md +++ b/docs/user-manual/en/exclusive-queues.md @@ -3,44 +3,43 @@ Exclusive queues are special queues which route all messages to only one consumer at a time. -This is useful when you want all messages to be processed serially by the same consumer, -when a producer does not specify [Message Grouping](message-grouping.md). +This is useful when you want all messages to be processed serially by the same +consumer, when a producer does not specify [Message Grouping](message-grouping.md). An example might be orders sent to an address and you need to consume them in the exact same order they were produced. -Obviously exclusive queues have a draw back that you cannot scale out the consumers to -improve consumption as only one consumer would technically be active. +Obviously exclusive queues have a draw back that you cannot scale out the +consumers to improve consumption as only one consumer would technically be active. Here we advise that you look at message groups first. ## Configuring Exclusive Queues -Exclusive queues can be statically configured using the `exclusive` boolean property: +Exclusive queues can be statically configured using the `exclusive` boolean +property: ```xml -<configuration ...> - <core ...> - ... - <address name="foo.bar"> - <multicast> - <queue name="orders1" exclusive="true"/> - </multicast> - </address> - </core> -</configuration> +<address name="foo.bar"> + <multicast> + <queue name="orders1" exclusive="true"/> + </multicast> +</address> ``` -Specified on creating a Queue by using the CORE api specifying the parameter `exclusive` to `true`. +Specified on creating a Queue by using the CORE api specifying the parameter +`exclusive` to `true`. -Or on auto-create when using the JMS Client by using address parameters when creating the destination used by the consumer. +Or on auto-create when using the JMS Client by using address parameters when +creating the destination used by the consumer. ```java Queue queue = session.createQueue("my.destination.name?exclusive=true"); Topic topic = session.createTopic("my.destination.name?exclusive=true"); ``` -Also the default for all queues under and address can be defaulted using the address-setting configuration: +Also the default for all queues under and address can be defaulted using the +`address-setting` configuration: ```xml <address-setting match="lastValueQueue"> @@ -48,12 +47,12 @@ Also the default for all queues under and address can be defaulted using the add </address-setting> ``` -By default, `default-exclusive-queue` is `false`. Address wildcards can be used -to configure exclusive queues for a set of addresses (see [here](wildcard-syntax.md)). +By default, `default-exclusive-queue` is `false`. Address +[wildcards](wildcard-syntax.md) can be used to configure exclusive queues for a +set of addresses. ## Example -See `Exclusive Queue` in [examples](examples.md). - -For additional examples see `org.apache.activemq.artemis.tests.integration.jms.client.ExclusiveTest` +See the [exclusive queue example](examples.md#exclusive) which shows how +exclusive queues are configured and used with JMS. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/filter-expressions.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/filter-expressions.md b/docs/user-manual/en/filter-expressions.md index 0c9183c..425b5c1 100644 --- a/docs/user-manual/en/filter-expressions.md +++ b/docs/user-manual/en/filter-expressions.md @@ -10,19 +10,19 @@ please the JMS javadoc for Filter expressions are used in several places in Apache ActiveMQ Artemis -- Predefined Queues. When pre-defining a queue, in - `broker.xml` in either the core or jms configuration a filter - expression can be defined for a queue. Only messages that match the - filter expression will enter the queue. +- Predefined Queues. When pre-defining a queue, in + `broker.xml` in either the core or jms configuration a filter + expression can be defined for a queue. Only messages that match the + filter expression will enter the queue. -- Core bridges can be defined with an optional filter expression, only - matching messages will be bridged (see [Core Bridges](core-bridges.md)). +- Core bridges can be defined with an optional filter expression, only + matching messages will be bridged (see [Core Bridges](core-bridges.md)). -- Diverts can be defined with an optional filter expression, only - matching messages will be diverted (see [Diverts](diverts.md)). +- Diverts can be defined with an optional filter expression, only + matching messages will be diverted (see [Diverts](diverts.md)). -- Filter are also used programmatically when creating consumers, - queues and in several places as described in [management](management.md). +- Filter are also used programmatically when creating consumers, + queues and in several places as described in [management](management.md). There are some differences between JMS selector expressions and Apache ActiveMQ Artemis core filter expressions. Whereas JMS selector expressions operate on a @@ -31,21 +31,21 @@ JMS message, Apache ActiveMQ Artemis core filter expressions operate on a core m The following identifiers can be used in a core filter expressions to refer to attributes of the core message in an expression: -- `AMQPriority`. To refer to the priority of a message. Message - priorities are integers with valid values from `0 - 9`. `0` is the - lowest priority and `9` is the highest. E.g. - `AMQPriority = 3 AND animal = 'aardvark'` +- `AMQPriority`. To refer to the priority of a message. Message + priorities are integers with valid values from `0 - 9`. `0` is the + lowest priority and `9` is the highest. E.g. + `AMQPriority = 3 AND animal = 'aardvark'` -- `AMQExpiration`. To refer to the expiration time of a message. The - value is a long integer. +- `AMQExpiration`. To refer to the expiration time of a message. The + value is a long integer. -- `AMQDurable`. To refer to whether a message is durable or not. The - value is a string with valid values: `DURABLE` or `NON_DURABLE`. +- `AMQDurable`. To refer to whether a message is durable or not. The + value is a string with valid values: `DURABLE` or `NON_DURABLE`. -- `AMQTimestamp`. The timestamp of when the message was created. The - value is a long integer. +- `AMQTimestamp`. The timestamp of when the message was created. The + value is a long integer. -- `AMQSize`. The size of a message in bytes. The value is an integer. +- `AMQSize`. The size of a message in bytes. The value is an integer. Any other identifiers used in core filter expressions will be assumed to be properties of the message. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/flow-control.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/flow-control.md b/docs/user-manual/en/flow-control.md index 86654f2..44fbee3 100644 --- a/docs/user-manual/en/flow-control.md +++ b/docs/user-manual/en/flow-control.md @@ -37,11 +37,11 @@ bytes). The value can be: -- `-1` for an *unbounded* buffer +- `-1` for an *unbounded* buffer -- `0` to not buffer any messages. +- `0` to not buffer any messages. -- `>0` for a buffer with the given maximum size in bytes. +- `>0` for a buffer with the given maximum size in bytes. Setting the consumer window size can considerably improve performance depending on the messaging use case. As an example, let's consider the @@ -106,7 +106,7 @@ control. The default value is `-1`. Please see [the examples chapter](examples.md) for a working example of limiting consumer rate. -> **Note** +> **Note:** > > Rate limited flow control can be used in conjunction with window based > flow control. Rate limited flow control only effects how many messages @@ -198,7 +198,7 @@ to prevent that max size being exceeded. Note the policy must be set to `BLOCK` to enable blocking producer flow control. -> **Note** +> **Note:** > > Note that in the default configuration all addresses are set to block > producers after 10 MiB of message data is in the address. This means @@ -207,7 +207,7 @@ control. > want this behaviour increase the `max-size-bytes` parameter or change > the address full message policy. -> **Note** +> **Note:** > > Producer credits are allocated from the broker to the client. Flow control > credit checking (i.e. checking a producer has enough credit) is done on the http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/40b66d13/docs/user-manual/en/graceful-shutdown.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/graceful-shutdown.md b/docs/user-manual/en/graceful-shutdown.md index 6c5cba3..3869b13 100644 --- a/docs/user-manual/en/graceful-shutdown.md +++ b/docs/user-manual/en/graceful-shutdown.md @@ -1,21 +1,19 @@ # Graceful Server Shutdown -In certain circumstances an administrator might not want to disconnect -all clients immediately when stopping the broker. In this situation the -broker can be configured to shutdown *gracefully* using the -`graceful-shutdown-enabled` boolean configuration parameter. +In certain circumstances an administrator might not want to disconnect all +clients immediately when stopping the broker. In this situation the broker can +be configured to shutdown *gracefully* using the `graceful-shutdown-enabled` +boolean configuration parameter. -When the `graceful-shutdown-enabled` configuration parameter is `true` -and the broker is shutdown it will first prevent any additional clients -from connecting and then it will wait for any existing connections to -be terminated by the client before completing the shutdown process. The -default value is `false`. +When the `graceful-shutdown-enabled` configuration parameter is `true` and the +broker is shutdown it will first prevent any additional clients from connecting +and then it will wait for any existing connections to be terminated by the +client before completing the shutdown process. The default value is `false`. Of course, it's possible a client could keep a connection to the broker -indefinitely effectively preventing the broker from shutting down -gracefully. To deal with this of situation the -`graceful-shutdown-timeout` configuration parameter is available. This -tells the broker (in milliseconds) how long to wait for all clients to -disconnect before forcefully disconnecting the clients and proceeding -with the shutdown process. The default value is `-1` which means the -broker will wait indefinitely for clients to disconnect. +indefinitely effectively preventing the broker from shutting down gracefully. +To deal with this of situation the `graceful-shutdown-timeout` configuration +parameter is available. This tells the broker (in milliseconds) how long to +wait for all clients to disconnect before forcefully disconnecting the clients +and proceeding with the shutdown process. The default value is `-1` which means +the broker will wait indefinitely for clients to disconnect.
