Skip to content

Commit fdbedf5

Browse files
Recent history exchange: README.md updates
(cherry picked from commit 1afe656)
1 parent 2572964 commit fdbedf5

File tree

1 file changed

+8
-36
lines changed
  • deps/rabbitmq_recent_history_exchange

1 file changed

+8
-36
lines changed

deps/rabbitmq_recent_history_exchange/README.md

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,29 @@
22

33
Keeps track of the last 20 messages that passed through the exchange. Every time a queue is bound to the exchange it delivers that last 20 messages to them. This is useful for implementing a very simple __Chat History__ where clients that join the conversation can get the latest messages.
44

5-
Exchange Type: `x-recent-history`
5+
Exchange yype: `x-recent-history`.
66

77
## Installation ##
88

9-
### RabbitMQ 3.6.0 or later
9+
This plugin ships with RabbitMQ.
1010

11-
As of RabbitMQ `3.6.0` this plugin is included into the RabbitMQ distribution.
12-
13-
Enable it with the following command:
14-
15-
```bash
16-
rabbitmq-plugins enable rabbitmq_recent_history_exchange
17-
```
18-
19-
### With Earlier Versions
20-
21-
Install the corresponding .ez files from our
22-
[Community Plugins archive](https://www.rabbitmq.com/community-plugins/)..
23-
24-
Then run the following command:
11+
Like all other plugins, it must be enabled before it can be used:
2512

2613
```bash
27-
rabbitmq-plugins enable rabbitmq_recent_history_exchange
14+
[sudo] rabbitmq-plugins enable rabbitmq_recent_history_exchange
2815
```
2916

30-
## Building from Source
31-
32-
Please see [RabbitMQ Plugin Development guide](https://www.rabbitmq.com/plugin-development.html).
33-
34-
To build the plugin:
35-
36-
git clone git://github.com/rabbitmq/rabbitmq-recent-history-exchange.git
37-
cd rabbitmq-recent-history-exchange
38-
make
39-
40-
Then copy all the `*.ez` files inside the `plugins` folder to the [RabbitMQ plugins directory](https://www.rabbitmq.com/relocate.html)
41-
and enable the plugin:
42-
43-
[sudo] rabbitmq-plugins enable rabbitmq_recent_history_exchange
44-
4517
## Usage ##
4618

47-
### Creating an exchange ###
19+
### Creating an exchange
4820

4921
To create a _recent history exchange_, just declare an exchange providing the type `"x-recent-history"`.
5022

5123
```java
5224
channel.exchangeDeclare("logs", "x-recent-history");
5325
```
5426

55-
### Providing a custom history length ###
27+
### Providing a custom history length
5628

5729
Typically this exchange will store the latest 20 messages sent over
5830
the exchange. If you want to set a different cache length, then you
@@ -67,13 +39,13 @@ args.put("x-recent-history-length", 60);
6739
channel.exchangeDeclare("rh", "x-recent-history", false, false, args);
6840
```
6941

70-
### Preventing some messages from being stored ###
42+
### Preventing some messages from being stored
7143

7244
In case you would like to not store certain messages, just
7345
add the header `"x-recent-history-no-store"` with the value `true` to
7446
the message.
7547

76-
## Disabling the Plugin ##
48+
## Disabling the Plugin
7749

7850
A future version of RabbitMQ will allow users to disable plugins. When
7951
you disable this plugin, it will delete all the cached messages.

0 commit comments

Comments
 (0)