Skip to content

Commit 972c295

Browse files
Update Readme
1 parent c07e247 commit 972c295

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

deps/rabbitmq_local_exchange/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# RabbitMQ Local Exchange Type
22

3-
TODO
3+
This exchange type favours local bound queues (local to the producer's connection). It's basically
4+
a direct exchange, with the exception that, only one queue and in particular, a queue local to the
5+
producer's connection receives the message. If there are no local queues, the exchange behaves like
6+
the random exchange, i.e. it randomly picks the target queue.
7+
48

59
## Installation
610

7-
TODO
11+
Install the corresponding .ez files from our
12+
[GitHub releases](https://github.com/rabbitmq/rabbitmq-local-exchange/releases)
13+
Then run the following command:
14+
15+
```bash
16+
rabbitmq-plugins enable rabbitmq_local_exchange
17+
```
18+
819

920
## Building from Source
1021

@@ -24,7 +35,15 @@ and enable the plugin:
2435

2536
## Usage
2637

27-
TODO
38+
To create a _local_, just declare an exchange providing the type `"x-local"`.
39+
40+
```java
41+
channel.exchangeDeclare("cache-updates", "x-local");
42+
```
43+
44+
and bind several queues to it preferably if each queue is created on a different node.
45+
Routing keys will be ignored.
46+
2847

2948

3049
## License

0 commit comments

Comments
 (0)