doc fixes

This commit is contained in:
Andy Taylor 2017-03-09 10:11:48 +00:00 committed by Clebert Suconic
parent 37e37ebdc0
commit a9ff8e4d9f
6 changed files with 17 additions and 85 deletions

View File

@ -117,8 +117,7 @@ etc
```
Similarly, if you're using JMS, you can configure the JMS connection
factory directly on the client side without having to define a connector
on the server side or define a connection factory in `activemq-jms.xml`:
factory directly on the client side:
``` java
Map<String, Object> connectionParams = new HashMap<String, Object>();

View File

@ -246,7 +246,7 @@ Browser
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 1.1
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
@ -897,14 +897,3 @@ XA Send
The `xa-send` example shows you how message sending behaves in an XA
transaction in Apache ActiveMQ Artemis.
Core API Examples
=================
To run a core example, simply `cd` into the appropriate example
directory and type `ant`
Embedded
--------
The `embedded` example shows how to embed the Apache ActiveMQ Artemis server within
your own code.

View File

@ -94,8 +94,6 @@ or
### Data Replication
Support for network-based data replication was added in version 2.3.
When using replication, the live and the backup servers do not share the
same data directories, all data synchronization is done over the
network. Therefore all (persistent) data received by the live server

View File

@ -159,9 +159,9 @@ settings
In the default configuration, all addresses are configured to block
producers after 10 MiB of data are in the address.
## Caution with Addresses with Multiple Queues
## Caution with Addresses with Multiple Multicast Queues
When a message is routed to an address that has multiple queues bound to
When a message is routed to an address that has multiple multicast queues bound to
it, e.g. a JMS subscription in a Topic, there is only 1 copy of the
message in memory. Each queue only deals with a reference to this.
Because of this the memory is only freed up once all queues referencing
@ -173,7 +173,7 @@ through an extra storage on the paging system.
For example:
- An address has 10 queues
- An address has 10 multicast queues
- One of the queues does not deliver its messages (maybe because of a
slow consumer).

View File

@ -86,18 +86,14 @@ does not exist then an exception will be sent
> For the next version we will add a flag to aut create durable queue
> but for now you will have to add them via the configuration
### AMQP and Topics
### AMQP and Multicast Queues (Topics)
Although amqp has no notion of topics it is still possible to treat amqp consumers or receivers as subscriptions rather
than just consumers on a queue. By default any receiving link that attaches to an address with the prefix `jms.topic.`
than just consumers on a queue. By default any receiving link that attaches to an address that has only multicast enabled
will be treated as a subscription and a subscription queue will be created. If the Terminus Durability is either UNSETTLED_STATE
or CONFIGURATION then the queue will be made durable, similar to a JMS durable subscription and given a name made up from
the container id and the link name, something like `my-container-id:my-link-name`. if the Terminus Durability is configured
as NONE then a volatile queue will be created.
The prefix can be changed by configuring the Acceptor and setting the `pubSubPrefix` like so
> <acceptor name="amqp">tcp://0.0.0.0:5672?protocols=AMQP;pubSubPrefix=foo.bar.</acceptor>
as NONE then a volatile multicast queue will be created.
Artemis also supports the qpid-jms client and will respect its use of topics regardless of the prefix used for the address.
@ -378,36 +374,6 @@ expression syntax follows the *core filter syntax* described in the
### Stomp and JMS interoperability
#### Using JMS destinations
As explained in [Mapping JMS Concepts to the Core API](jms-core-mapping.md),
JMS destinations are also mapped to Apache ActiveMQ Artemis
addresses and queues. If you want to use Stomp to send messages to JMS
destinations, the Stomp destinations must follow the same convention:
- send or subscribe to a JMS *Queue* by prepending the queue name by
`jms.queue.`.
For example, to send a message to the `orders` JMS Queue, the Stomp
client must send the frame:
SEND
destination:jms.queue.orders
hello queue orders
^@
- send or subscribe to a JMS *Topic* by prepending the topic name by
`jms.topic.`.
For example to subscribe to the `stocks` JMS Topic, the Stomp client
must send the frame:
SUBSCRIBE
destination:jms.topic.stocks
^@
#### Sending and consuming Stomp message from JMS or Apache ActiveMQ Artemis Core API
Stomp is mainly a text-orientated protocol. To make it simpler to
@ -445,26 +411,18 @@ It is possible to pre-configure durable subscriptions since the Stomp implementa
the queue used for the durable subscription in a deterministic way (i.e. using the format of
`client-id`.`subscription-name`). For example, if you wanted to configure a durable
subscription on the JMS topic `myTopic` with a client-id of `myclientid` and a subscription
name of `mysubscriptionname` then first you'd configure the topic:
~~~
<jms xmlns="urn:activemq:jms">
...
<topic name="myTopic"/>
...
</jms>
~~~
Then configure the durable subscription:
name of `mysubscriptionname` then configure the durable subscription:
~~~
<core xmlns="urn:activemq:core">
...
<queues>
<queue name="myclientid.mysubscription">
<address>jms.topic.myTopic</address>
</queue>
</queues>
<addresses>
<address name="myTopic">
<multicast>
<queue name="myclientid.mysubscription"/>
</multicast>
</address>
</addresses>
...
</core>
~~~

View File

@ -4,19 +4,7 @@ Apache ActiveMQ Artemis provides a simple bootstrap class,
`org.apache.activemq.integration.spring.SpringJmsBootstrap`, for
integration with Spring. To use it, you configure Apache ActiveMQ Artemis as you always
would, through its various configuration files like
`broker.xml`, `activemq-jms.xml`, and
`activemq-users.xml`. The Spring helper class starts the Apache ActiveMQ Artemis server
and adds any factories or destinations configured within
`activemq-jms.xml` directly into the namespace of the Spring context.
Let's take this `activemq-jms.xml` file for instance:
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/artemis-jms.xsd">
<!--the queue used by the example-->
<queue name="exampleQueue"/>
</configuration>
`broker.xml`.
Here we've specified a `javax.jms.ConnectionFactory` we want bound to a
`ConnectionFactory` entry as well as a queue destination bound to a