blob: 47c7b72b4d47e9e0f6e85f72e3c88453e59d4ba1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<section id="Java-Broker-Concepts-Exchanges">
<title>Exchanges</title>
<para><emphasis>Exchange</emphasis> is the named entity within the <emphasis>Virtual Host</emphasis> which receives messages from producer applications and
optionally routes them to message queues within the <emphasis>Virtual Host</emphasis>. The message routing occurs based on exchange routing algorithm
and queue <emphasis>Bindings</emphasis>.</para>
<para>
The following <emphasis>Exchanges</emphasis> are implemented and supported by the <emphasis>Broker</emphasis>:
<itemizedlist>
<listitem><para><emphasis>Direct Exchange</emphasis> provides routing of messages to zero or more queues based on an exact match between
the routing key of the message, and the binding key used to bind the queue to the exchange
</para></listitem>
<listitem><para><emphasis>Topic Exchange</emphasis> provides routing to bound queues based on a pattern match between the binding key and the
routing key of the message. This exchange type is used to support the classic publish/subscribe paradigm using a topic namespace as the
addressing model to select and deliver messages across multiple consumers based on a partial or full match on a topic pattern.
</para></listitem>
<listitem><para><emphasis>Fanout Exchange</emphasis> provides routing of messages to all bound queues regardless of the message's routing key.
</para></listitem>
<listitem><para><emphasis>Headers Exchange</emphasis> provides routing based on header properties within the AMQP message.
The message is passed to the queue if the headers property matches the arguments with which the queue was bound.
</para></listitem>
</itemizedlist>
</para>
<para>Also, Broker supports the concept of a Default Exchange to which all queues are bound using their name as a binding key.</para>
<para>Any number of exchanges of any type can be created on <emphasis>Virtual Host</emphasis>.</para>
<para>Exchange configuration is covered in <xref linkend="Java-Broker-Exchanges"/>.</para>
</section>
|