Return-Path:
This example demonstrates how to configure several properties on the HornetQ Resource Adapter. We setup two
+ This example demonstrates how to configure several properties on the ActiveMQ Resource Adapter. We setup two
WildFly. The enterprise application is being deployed in one application server while the MDBs and JMS
Connections are pointing to a remote server This example is composed of two message-driven beans (MDB), MDBQueueA and MDBQueueB, and a stateless session
@@ -48,8 +48,8 @@
This example demonstrates how to configure the Resource adapter to connect to a remote HornetQ server This example demonstrates how to configure the Resource adapter to connect to a remote ActiveMQ server This example is composed of a message driven bean and a client
MDBRemoteServerClientExample will send a message to the MDB via a queue and wait for the MDB to send a response via
a reply queue The same pooled-connection-factory used for JCA inflow also configures an outgoing JCA connection factory which Java EE components can use to send messages to the same remote HornetQ Server. The same pooled-connection-factory used for JCA inflow also configures an outgoing JCA connection factory which Java EE components can use to send messages to the same remote ActiveMQ Server. This example shows how to configure and run a JMS Bridge in WildFly. The source and target destinations can be on different servers, even from different JMS providers. For example, you can use this
- JMS Bridge to bridge a legacy JMS provider to HornetQ during migration.Java EE Resource Adapter Configuration Example
-
- Queue destQueueA = HornetQJMSClient.createQueue("A");
- Queue destQueueB = HornetQJMSClient.createQueue("B");
+ Queue destQueueA = ActiveMQJMSClient.createQueue("A");
+ Queue destQueueB = ActiveMQJMSClient.createQueue("B");
Java EE JCA Resource Adapter Remote Server Configuration Example
- Configuring the outgoing JCA resource adapter
-
<pooled-connection-factory name="hornetq-ra-remote">
<transaction mode="xa"/>
@@ -106,7 +106,7 @@
- Queue destQueue = HornetQJMSClient.createQueue("mdbReplyQueue");
+ Queue destQueue = ActiveMQJMSClient.createQueue("mdbReplyQueue");
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/javaee/jms-bridge/readme.html
----------------------------------------------------------------------
diff --git a/examples/javaee/jms-bridge/readme.html b/examples/javaee/jms-bridge/readme.html
index bf64790..a5c0b7b 100644
--- a/examples/javaee/jms-bridge/readme.html
+++ b/examples/javaee/jms-bridge/readme.html
@@ -1,6 +1,6 @@
-
A bridge receives messages from a source JMS destination and forwards them to a target destination.
This example will show how to configure and run the simplest bridge:
This example will demonstrate XA recovery in WildFly with a HornetQ XA resource and a "buggy" XA resource.
+This example will demonstrate XA recovery in WildFly with a ActiveMQ XA resource and a "buggy" XA resource.
The example application will invoke an EJB which will send a JMS message in a transaction.
The server will crash while the transaction has not been committed (it is in the prepared state).
@@ -195,7 +195,7 @@
When the transaction is committed, it will prepare both XAResources and then commit them.
The failing resources will crash the server leaving the JMS XA Resource prepared but not committed
-When WildFly is restarted, it will automatically trigger a recovery phase. During that phase, HornetQ resources will be +
When WildFly is restarted, it will automatically trigger a recovery phase. During that phase, ActiveMQ resources will be scanned and the prepared transaction will be recovered and committed. It is then possible to consume this message
\ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/README.md ---------------------------------------------------------------------- diff --git a/examples/jms/README.md b/examples/jms/README.md index f95a3db..9c9e0fb 100644 --- a/examples/jms/README.md +++ b/examples/jms/README.md @@ -1,4 +1,4 @@ -Running the HornetQ Examples +Running the ActiveMQ Examples ============================ To run an individual example firstly cd into the example directory and run http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/activemq-jms-examples-common/config/logging.properties ---------------------------------------------------------------------- diff --git a/examples/jms/activemq-jms-examples-common/config/logging.properties b/examples/jms/activemq-jms-examples-common/config/logging.properties index 890ffa6..754d138 100644 --- a/examples/jms/activemq-jms-examples-common/config/logging.properties +++ b/examples/jms/activemq-jms-examples-common/config/logging.properties @@ -17,9 +17,9 @@ # show messages at the INFO and above levels. handlers=java.util.logging.ConsoleHandler #handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler -java.util.logging.ConsoleHandler.formatter=org.apache.activemq6.integration.logging.HornetQLoggerFormatter +java.util.logging.ConsoleHandler.formatter=org.apache.activemq6.integration.logging.ActiveMQLoggerFormatter java.util.logging.FileHandler.level=INFO -java.util.logging.FileHandler.formatter=org.apache.activemq6.integration.logging.HornetQLoggerFormatter +java.util.logging.FileHandler.formatter=org.apache.activemq6.integration.logging.ActiveMQLoggerFormatter java.util.logging.FileHandler.pattern=logs/hornetq.log # Default global logging level. # This specifies which kinds of events are logged across http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/activemq-ra-rar/src/main/resources/ra.xml ---------------------------------------------------------------------- diff --git a/examples/jms/activemq-ra-rar/src/main/resources/ra.xml b/examples/jms/activemq-ra-rar/src/main/resources/ra.xml index e7bbc63..67e1d2b 100644 --- a/examples/jms/activemq-ra-rar/src/main/resources/ra.xml +++ b/examples/jms/activemq-ra-rar/src/main/resources/ra.xml @@ -8,8 +8,8 @@ http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" version="1.5"> -Now before we run the example we need a mobile application to receive it. Writing a mobile app is beyond the scope of this example but for testing purposes we have supplied an Android app you can use, simply install on your android phone. - It can be found here. For a more in depth mobile + It can be found here. For a more in depth mobile app example visit the AeroGear site.
Once you have installed the mobile app you will need to configure the following:
@@ -45,7 +45,7 @@ 'mvn -Dendpoint=my aerogear url -Dapplicationid=my application id -Dmastersecret=my master secret -Djsse.enableSNIExtension=false clean verify'. If you arent using java 7 you can omit the 'jsse.enableSNIExtension=false' -You should see something like this in your HornetQServer
+You should see something like this in your ActiveMQServer
@@ -58,7 +58,7 @@
And on your mobile app you should see a message from HornetQ
+And on your mobile app you should see a message from ActiveMQ
Now lets look a bit more closely at the configuration in hornetq-configuration.xml
The Applet will connect to HornetQ server running on localhost and +
The Applet will connect to ActiveMQ server running on localhost and
publishes messages on a topic exampleTopic
when "Send" is pressed.
The Applet is also a MessageListener and will display messages received from the topic
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/applet/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/applet/readme.html b/examples/jms/applet/readme.html index e954316..c124f3c 100644 --- a/examples/jms/applet/readme.html +++ b/examples/jms/applet/readme.html @@ -1,6 +1,6 @@ -To run the example, simply type mvn verify
from this directory to start
- the HornetQ server and an HTTP server.
Then, go to http://127.0.0.1:8088/applet.html to load and use the applet.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/application-layer-failover/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/readme.html b/examples/jms/application-layer-failover/readme.html index 8fa4b32..9dd8b6d 100644 --- a/examples/jms/application-layer-failover/readme.html +++ b/examples/jms/application-layer-failover/readme.html @@ -1,6 +1,6 @@ -HornetQ implements fully transparent automatic failover of connections from a live node to a backup node which requires +
ActiveMQ implements fully transparent automatic failover of connections from a live node to a backup node which requires no special coding. This is described in a different example and requires server replication.
-However, HornetQ also supports Application-Layer failover which is useful in the case where replication is not enabled.
-With Application-Layer failover, it's up to the application to register a JMS ExceptionListener with HornetQ. - This listener will then be called by HornetQ in the event that connection failure is detected.
+However, ActiveMQ also supports Application-Layer failover which is useful in the case where replication is not enabled.
+With Application-Layer failover, it's up to the application to register a JMS ExceptionListener with ActiveMQ. + This listener will then be called by ActiveMQ in the event that connection failure is detected.
User code in the ExceptionListener can then recreate any JMS Connection, Session, etc on another node and the application can continue.
Application-Layer failover is an alternative approach to High Availabilty (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 is created, any uncommitted work in the old Session will be lost, and any unacknowledged messages might be redelivered.
-For more information on HornetQ failover and HA, and clustering in general, please see the clustering +
For more information on ActiveMQ failover and HA, and clustering in general, please see the clustering section of the user manual.
This 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 HornetQ servers which are remotely separated. +
Core bridges are used to create message flows between any two ActiveMQ 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.
They can also be configured with an optional filter expression, and will only forward messages that @@ -19,11 +19,11 @@
Furthermore they can be configured to use an optional Transformer class. A user-defined Transformer class can be specified which is called at forwarding time. This gives the user the opportunity to transform the message in some ways, e.g. changing its properties or body
-HornetQ also includes a JMS Bridge. This is similar to a core bridge, but uses the JMS API +
ActiveMQ also includes a JMS Bridge. This is similar to a core bridge, but uses the JMS API and can be used to bridge between any two JMS 1.1 compliant messaging systems. The core bridge is limited to bridging - between HornetQ instances, but may provide better performance than the JMS bridge. The JMS bridge is covered in + between ActiveMQ instances, but may provide better performance than the JMS bridge. The JMS bridge is covered in a separate example.
-For more information on bridges, please see the HornetQ user manual.
+For more information on bridges, please see the ActiveMQ user manual.
In this example we will demonstrate a simple sausage factory for aardvarks.
We have a JMS queue on server 0 named sausage-factory
, and we have a
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/browser/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/browser/readme.html b/examples/jms/browser/readme.html
index 42551ae..8757e2b 100644
--- a/examples/jms/browser/readme.html
+++ b/examples/jms/browser/readme.html
@@ -1,6 +1,6 @@
This example shows you how to use a JMS QueueBrowser with HornetQ.
+
This example shows you how to use a JMS QueueBrowser with ActiveMQ.
Queues are a standard part of JMS, please consult the JMS 1.1 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.
This example shows how to kick off a client connected to HornetQ +
This example shows how to kick off a client connected to ActiveMQ using JMX
-The example will connect to HornetQ. Using JMX, we will list the remote addresses connected to the - server and close the corresponding connections. The client will be kicked off from HornetQ receiving +
The example will connect to ActiveMQ. Using JMX, we will list the remote addresses connected to the + server and close the corresponding connections. The client will be kicked off from ActiveMQ receiving an exception that its JMS connection was interrupted.
HornetQ exposes its managed resources by default on the platform MBeanServer.
+ActiveMQ exposes its managed resources by default on the platform MBeanServer.
To access this MBeanServer remotely, the Java Virtual machine must be started with system properties:
-Dcom.sun.management.jmxremote
@@ -27,7 +27,7 @@
These properties are explained in the Java 5 Management guide (please note that for this example, we will disable user authentication for simplicity).
-With these properties, HornetQ server will be manageable remotely using standard JMX URL on port 3000
.
With these properties, ActiveMQ server will be manageable remotely using standard JMX URL on port 3000
.
connection.start();
-
- ObjectName on = ObjectNameBuilder.DEFAULT.getHornetQServerObjectName();
+ ObjectName on = ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName();
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), new HashMap());
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
- HornetQServerControlMBean serverControl = (HornetQServerControlMBean)MBeanServerInvocationHandler.newProxyInstance(mbsc,
+ ActiveMQServerControlMBean serverControl = (ActiveMQServerControlMBean)MBeanServerInvocationHandler.newProxyInstance(mbsc,
on,
- HornetQServerControlMBean.class,
+ ActiveMQServerControlMBean.class,
false);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-configuration.xml b/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-configuration.xml
index ad0ab57..1696017 100644
--- a/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-configuration.xml
+++ b/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-configuration.xml
@@ -10,7 +10,7 @@
Thread.sleep(5000);
connectionA = connectionFactory.createConnection();
- ((HornetQConnection)connectionA).setFailoverListener(new FailoverListenerImpl());
+ ((ActiveMQConnection)connectionA).setFailoverListener(new FailoverListenerImpl());
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/client-side-load-balancing/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/readme.html b/examples/jms/client-side-load-balancing/readme.html
index 7793546..cc304ba 100644
--- a/examples/jms/client-side-load-balancing/readme.html
+++ b/examples/jms/client-side-load-balancing/readme.html
@@ -1,6 +1,6 @@
- This example demonstrates how connnections created from a single JMS Connection factory can be created - to different nodes of the cluster. In other words it demonstrates how HornetQ does client side load balancing of + to different nodes of the cluster. In other words it demonstrates how ActiveMQ does client side load balancing of connections across the cluster.
The particular load-balancing policy can be chosen to be random, round-robin or user-defined. Please see the user guide for more details of how to configure the specific load-balancing policy. In this example we will use the default round-robin load balancing policy.
-The list of servers over which HornetQ will round-robin the connections can either be specified explicitly +
The list of servers over which ActiveMQ will round-robin the connections can either be specified explicitly in the connection factory when instantiating it directly, when configuring it on the server or configured to use UDP discovery to discover the list of servers over which to round-robin. This example will use UDP discovery to obtain the list.
@@ -22,7 +22,7 @@ can be seen in thehornetq-configuration.xml
file.
A JMS ConnectionFactory is deployed on each server specifying the discovery group that will be used by that connection factory.
-For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
This example demonstrates a clustered JMS durable subscription. Normally durable subscriptions exist on a single node and can only have one subscriber at any one time, - however, with HornetQ it's possible to create durable subscription instances with the same name and client-id + however, with ActiveMQ it's possible to create durable subscription instances with the same name and client-id on different nodes of the cluster, and consume from them simultaneously. This allows the work of processing messages from a durable subscription to be spread across the cluster in a similar way to how JMS Queues can be load balanced across the cluster @@ -37,7 +37,7 @@ </cluster-connection> -
For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
For more information on HornetQ clustering and grouping see the clustering and grouping +
For more information on ActiveMQ clustering and grouping see the clustering and grouping section of the user manual.
To run the example, simply type mvn verify
from this directory
This example demonstrates the working of a two node cluster using JGroups as the underlying topology broadcasting/discovery technique.
@@ -15,7 +15,7 @@ in a round-robin fashion.This example uses JNDI to lookup the JMS Queue and ConnectionFactory objects. If you prefer not to use JNDI, these could be instantiated directly.
-To enable HornetQ to use JGroups you need to configure JGroups configuration file and make sure it is on the classpath +
To enable ActiveMQ to use JGroups you need to configure JGroups configuration file and make sure it is on the classpath by placing in the configuration directory, the file test-jgroups-file_ping.xml is the configuration used in this exaample
You then configure the jgroups file used by the broadcast and discovery groups in the configuration along with the @@ -40,7 +40,7 @@ </discovery-groups> -
For more information on HornetQ clustering in general, please see the clustering +
For more information on ActiveMQ clustering in general, please see the clustering section of the user manual.
To run the example, simply type ./build.sh
(or build.bat
on windows) from this directory
We then create a consumer on 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.
-In other words, HornetQ load balances the sent messages across all consumers on the cluster
+In other words, ActiveMQ load balances the sent messages across all consumers on the cluster
This example uses JNDI to lookup the JMS Queue and ConnectionFactory objects. If you prefer not to use JNDI, these could be instantiated directly.
Here's the relevant snippet from the server configuration, which tells the server to form a cluster between the two nodes @@ -29,7 +29,7 @@ </cluster-connection> -
For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
To run the example, simply type mvn verify
from this directory
Subscribers for the topic are created on each node, and a producer is created on only one of the nodes.
Some messages are sent by the producer, and we verify that all subscribers receive all the sent messages.
-This example uses HornetQ's default stand-alone clustered configuration. +
This example uses ActiveMQ's default stand-alone clustered configuration. The relevant snippet from the server configuration, which tells the servers to form a cluster between the three nodes and to load balance the messages between the nodes is:
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/clustered-static-discovery/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/clustered-static-discovery/readme.html b/examples/jms/clustered-static-discovery/readme.html index 96ef23c..84b5355 100644 --- a/examples/jms/clustered-static-discovery/readme.html +++ b/examples/jms/clustered-static-discovery/readme.html @@ -1,6 +1,6 @@ --HornetQ JMS Load Balanced Static Clustered Queue Example +ActiveMQ JMS Load Balanced Static Clustered Queue Example @@ -13,7 +13,7 @@We then create a consumer on 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.
-In other words, HornetQ load balances the sent messages across all consumers on the cluster
+In other words, ActiveMQ load balances the sent messages across all consumers on the cluster
This example uses JNDI to lookup the JMS Queue and ConnectionFactory objects. If you prefer not to use JNDI, these could be instantiated directly.
Here's the relevant snippet from the server configuration, which tells the server to form a cluster between the two nodes @@ -32,7 +32,7 @@ </cluster-connection>
For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
To run the example, simply type mvn verify
from this directory
We then create a consumer on 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 all consumers receive the sent messages in a round-robin fashion.
-In other words, HornetQ load balances the sent messages across all consumers on the cluster
+In other words, ActiveMQ load balances the sent messages across all consumers on the cluster
This example uses JNDI to lookup the JMS Queue and ConnectionFactory objects. If you prefer not to use JNDI, these could be instantiated directly.
Here's the relevant snippet from the server configuration, which tells the server to form a one way cluster between the three nodes @@ -38,7 +38,7 @@ </cluster-connection> -
For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
To run the example, simply type mvn verify
from this directory
For more information on HornetQ load balancing, and clustering in general, please see the clustering +
For more information on ActiveMQ load balancing, and clustering in general, please see the clustering section of the user manual.
To run the example, simply type mvn verify
from this directory
With HornetQ you can specify a maximum consume rate at which a JMS MessageConsumer will consume messages. +
With ActiveMQ 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. See hornetq-jms.xml
If this value is specified then HornetQ will ensure that messages are never consumed at a rate higher than +
If this value is specified then ActiveMQ will ensure that messages are never consumed at a rate higher than the specified rate. This is a form of consumer throttling.
In this example we specify a consumer-max-rate
of 10
messages per second in the hornetq-jms.xml
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/dead-letter/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/readme.html b/examples/jms/dead-letter/readme.html
index 5856c58..c0f9872 100644
--- a/examples/jms/dead-letter/readme.html
+++ b/examples/jms/dead-letter/readme.html
@@ -1,6 +1,6 @@
To prevent this, messaging systems define dead letter messages: after a specified unsuccessful delivery attempts, the message is removed from the destination and instead routed to a dead letter address where they can be consumed for further investigation.
- The example will show how to configure HornetQ to route a message to a dead letter address after 3 unsuccessful delivery attempts.
+ The example will show how to configure ActiveMQ to route a message to a dead letter address after 3 unsuccessful delivery attempts.
The example will send 1 message to a queue. We will deliver the message 3 times and rollback the session every time.
On the 4th attempt, there won't be any message to consume: it will have been moved to a dead letter address.
We will then consume this dead letter message.
@@ -30,7 +30,7 @@
This configuration will moved dead letter messages from exampleQueue
to the deadLetterQueue
.
HornetQ allows to specify either a Queue
by prefixing the dead-letter-address
with jms.queue.
+
ActiveMQ allows to specify either a Queue
by prefixing the dead-letter-address
with jms.queue.
or a Topic
by prefixing with jms.topic.
.
In this example, we will use a Queue
to hold the dead letter messages.
The maximum attempts of delivery is 3
. Once this figure is reached, a message is considered a dead letter message and is moved to
@@ -137,7 +137,7 @@
System.out.println("4th delivery from " + queue.getQueueName() + ": " + messageReceived);
-
We have configured HornetQ to send any dead letter messages to the deadLetterQueue
.
+
We have configured ActiveMQ to send any dead letter messages to the deadLetterQueue
.
We will now consume messages from this queue and receives the dead letter messages.
JMS does not specify the notion of dead letter destinations and messages. From JMS point of view, the message received from the dead letter queue
is a different message than the message removed from the queue after the unsuccessful delivery attempts:
the messages have the same content (properties and body) but their JMS headers differ.
- HornetQ defines additional properties for messages received from a dead letter destination
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/delayed-redelivery/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/delayed-redelivery/readme.html b/examples/jms/delayed-redelivery/readme.html index 0a2f44d..d2bd1b7 100644 --- a/examples/jms/delayed-redelivery/readme.html +++ b/examples/jms/delayed-redelivery/readme.html @@ -1,6 +1,6 @@ --HornetQ Delayed Redelivery Example +ActiveMQ Delayed Redelivery Example @@ -8,7 +8,7 @@Delayed Redelivery Example
-This example demonstrates how HornetQ can be configured to provide a delayed redelivery in the case +
This example demonstrates how ActiveMQ can be configured to provide a delayed redelivery in the case where 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 http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/divert/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/divert/readme.html b/examples/jms/divert/readme.html index 538283f..a60001f 100644 --- a/examples/jms/divert/readme.html +++ b/examples/jms/divert/readme.html @@ -1,6 +1,6 @@
-HornetQ Divert Example +ActiveMQ Divert Example @@ -8,7 +8,7 @@Divert Example
-HornetQ diverts allow messages to be transparently "diverted" from one address to another +
ActiveMQ diverts allow messages to be transparently "diverted" from one address to another with just some simple configuration defined on the server side.
Diverts can be defined to be exclusive or non-exclusive.
With an exclusive divert the message is intercepted and does not get sent to the queues originally http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/durable-subscription/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/durable-subscription/readme.html b/examples/jms/durable-subscription/readme.html index 0174734..a180969 100644 --- a/examples/jms/durable-subscription/readme.html +++ b/examples/jms/durable-subscription/readme.html @@ -1,6 +1,6 @@
-HornetQ JMS Durable Subscription Example +ActiveMQ JMS Durable Subscription Example @@ -8,7 +8,7 @@JMS Durable Subscription Example
-This example demonstrates how to use a durable subscription with HornetQ.
+This example demonstrates how to use a durable subscription with ActiveMQ.
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 http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/embedded-simple/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/embedded-simple/readme.html b/examples/jms/embedded-simple/readme.html index 9ee98d3..9963775 100644 --- a/examples/jms/embedded-simple/readme.html +++ b/examples/jms/embedded-simple/readme.html @@ -1,6 +1,6 @@
-HornetQ Embedded JMS Server Example +ActiveMQ Embedded JMS Server Example @@ -8,15 +8,15 @@Embedded JMS Server Example
-This examples shows how to setup and run an embedded JMS server using HornetQ along with HornetQ configuration files.
+This examples shows how to setup and run an embedded JMS server using ActiveMQ along with ActiveMQ configuration files.
Example step-by-step
To run the example, simply type
mvn verify
from this directory-
- Create HornetQ core configuration files and make sure they are within your classpath. By default, HornetQ +
- Create ActiveMQ core configuration files and make sure they are within your classpath. By default, ActiveMQ expects the classnames to be "hornetq-configuration.xml", "hornetq-jms.xml", and "hornetq-users.xml".
-- Create and start HornetQ JMS server
+- Create and start ActiveMQ JMS server
-EmbeddedJMS jmsServer = new EmbeddedJMS(); jmsServer.start();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/embedded/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/embedded/readme.html b/examples/jms/embedded/readme.html index b40b827..e49a0b0 100644 --- a/examples/jms/embedded/readme.html +++ b/examples/jms/embedded/readme.html @@ -1,6 +1,6 @@ -HornetQ Embedded JMS Server Example +ActiveMQ Embedded JMS Server Example @@ -8,8 +8,8 @@Embedded JMS Server Example
-This examples shows how to setup and run an embedded JMS server using HornetQ.
-HornetQ was designed using POJOs (Plain Old Java Objects) which means embedding HornetQ in your own application +
This examples shows how to setup and run an embedded JMS server using ActiveMQ.
+ActiveMQ was designed using POJOs (Plain Old Java Objects) which means embedding ActiveMQ in your own application is as simple as instantiating a few objects.
This example does not use any configuration files. The server is configured using POJOs and can be easily ported to any dependency injection framework.
@@ -18,7 +18,7 @@
We will setup and run a full-fledged JMS server which binds its JMS resources to JNDI and can be accessed by remote clients.To run the example, simply type
mvn verify
from this directory-
- Create HornetQ core configuration, and set the properties accordingly
+- Create ActiveMQ core configuration, and set the properties accordingly
-Configuration configuration = new ConfigurationImpl(); configuration.setPersistenceEnabled(false); @@ -26,9 +26,9 @@ configuration.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
Configuration configuration = new ConfigurationImpl();- Create the HornetQ core server
+- Create the ActiveMQ core server
-HornetQServer hornetqServer = HornetQ.newHornetQServer(configuration);
+ActiveMQServer hornetqServer = ActiveMQ.newActiveMQServer(configuration);
- Create and start the JNDI server (using JBoss JNDI implementation)
@@ -73,7 +73,7 @@ jmsConfig.getQueueConfigurations().add(queueConfig);- Start the JMS Server using the HornetQ core server and the JMS configuration
+- Start the JMS Server using the ActiveMQ core server and the JMS configuration
JMSServerManager jmsServer = new JMSServerManagerImpl(hornetqServer, jmsConfig); jmsServer.start();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/expiry/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/expiry/readme.html b/examples/jms/expiry/readme.html index df2f2fa..9ed21ec 100644 --- a/examples/jms/expiry/readme.html +++ b/examples/jms/expiry/readme.html @@ -1,6 +1,6 @@ -HornetQ Message Expiration Example +ActiveMQ Message Expiration Example @@ -8,10 +8,10 @@JMS Expiration Example
-This example shows you how to configure HornetQ so messages are expipired after a certain time..
+This example shows you how to configure ActiveMQ so messages are expipired after a certain time..
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).
-HornetQ can assign a expiry address to a given queue so that when messages are expired, they are removed from the queue and +
ActiveMQ can assign a expiry address to a given queue so that when messages are expired, they are removed from the queue and routed to an this address. These "expired" messages can later be consumed for further inspection.
The example will send 1 message with a short time-to-live to a queue. We will wait for the message to expire and checks that the message @@ -27,7 +27,7 @@
This configuration will moved expired messages from the
-exampleQueue
to theexpiryQueue
HornetQ allows to specify either a
Queue
by prefixing theexpiry-address
withjms.queue.
+ActiveMQ allows to specify either a
Queue
by prefixing theexpiry-address
withjms.queue.
or aTopic
by prefixing withjms.topic.
.
In this example, we will use aQueue
to hold the expired messages.Since we want to consume messages from this expiryQueue, we also need to add a JNDI binding to perform a lookup. @@ -109,7 +109,7 @@ System.out.println("Received message from " + queue.getQueueName() + ": " + messageReceived);
However, we have configured HornetQ to send any expired messages to the expiryQueue
.
+
However, we have configured ActiveMQ to send any expired messages to the expiryQueue
.
We will now consume messages from this expiry queue and receives the expired message.
JMS does not specify the notion of expiry queue. From JMS point of view, the message received from the expiry queue
is a different message than the message expired from the queue: the two messages have the same content (properties and body) but
their JMS headers differ.
- HornetQ defines additional properties to correlate the message received from the expiry queue with the
+ ActiveMQ defines additional properties to correlate the message received from the expiry queue with the
message expired from the queue
This example shows you how to configure HornetQ to use the HTTP protocol as its transport layer.
+This example shows you how to configure ActiveMQ to use the HTTP protocol as its transport layer.
-HornetQ supports a variety of network protocols to be its underlying transport without any specific code change.
+ActiveMQ supports a variety of network protocols to be its underlying transport without any specific code change.
-This example is taken from the queue example without any code change. By changing the configuration file, one can get HornetQ working with HTTP transport.
+This example is taken from the queue example without any code change. By changing the configuration file, one can get ActiveMQ working with HTTP transport.
All you need to do is open the server0/hornetq-configuration.xml and enable HTTP like the following
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/instantiate-connection-factory/readme.html ---------------------------------------------------------------------- diff --git a/examples/jms/instantiate-connection-factory/readme.html b/examples/jms/instantiate-connection-factory/readme.html index 59f63db..6bc09f3 100644 --- a/examples/jms/instantiate-connection-factory/readme.html +++ b/examples/jms/instantiate-connection-factory/readme.html @@ -1,6 +1,6 @@ -Usually, JMS Objects such as ConnectionFactories, Queue and Topic instances are looked up from JNDI before being used by the client code. This objects are called "administered objects" in JMS specification terminology.
-However, in some cases a JNDI server may not be available or desired. To come to the rescue HornetQ +
However, in some cases a JNDI server may not be available or desired. To come to the rescue ActiveMQ also supports the direct instantiation of these administered objects on the client side.
This allows the full set of JMS functionality to be available without requiring a JNDI server!
This example is very simple and based on the simple Queue example, however in this example we @@ -34,7 +34,7 @@ the server.
- Queue queue = new HornetQQueue("exampleQueue");
+ Queue queue = new ActiveMQQueue("exampleQueue");
- ConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(transportConfiguration);
+ ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(transportConfiguration);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4a6b980f/examples/jms/interceptor/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/readme.html b/examples/jms/interceptor/readme.html
index 4ded622..523ef24 100644
--- a/examples/jms/interceptor/readme.html
+++ b/examples/jms/interceptor/readme.html
@@ -1,6 +1,6 @@
- This example shows you how to implement and configure a simple incoming, server-side interceptor with HornetQ.
+This example shows you how to implement and configure a simple incoming, server-side interceptor with ActiveMQ.
-HornetQ allows an application to use an interceptor to hook into the messaging system. All that needs to do is to implement the +
ActiveMQ allows an application to use an interceptor to hook into the messaging system. All that needs to do is to implement the Interceptor interface, as defined below: