[ISSUE #6445] Fix the attribute of the compaction topic doc (#6451)

This commit is contained in:
Oliver
2023-03-27 15:26:10 +08:00
committed by GitHub
parent 654c12ed56
commit 9b90b5b70a
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ $ bin/mqadmin updateNamesrvConfig -k orderMessageEnable -v true
```shell
$ bin/mqadmin updateTopic -w 8 -r 8 -a +cleanup.policy=COMPACTION -n localhost:9876 -t ctopic -o true -c DefaultCluster
create topic to 127.0.0.1:10911 success.
TopicConfig [topicName=ctopic, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={+delete.policy=COMPACTION}]
TopicConfig [topicName=ctopic, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={+cleanup.policy=COMPACTION}]
```
### 生产数据
@@ -28,7 +28,7 @@ producer.start();
String topic = "ctopic";
String tag = "tag1";
String key = "key1";
Message msg = new Message(topic, tag, key, "bodys"getBytes(StandardCharsets.UTF_8));
Message msg = new Message(topic, tag, key, "bodys".getBytes(StandardCharsets.UTF_8));
SendResult sendResult = producer.send(msg, (mqs, message, shardingKey) -> {
int select = Math.abs(shardingKey.hashCode());
if (select < 0) {
@@ -64,7 +64,7 @@ messageQueueList.forEach(mq -> {
Map<String, byte[]> kvStore = Maps.newHashMap();
while (true) {
List<MessageExt> msgList = consumer.poll(1000);
if (msgList != null) {
if (CollectionUtils.isNotEmpty(msgList)) {
msgList.forEach(msg -> kvStore.put(msg.getKeys(), msg.getBody()));
}
}
+3 -3
View File
@@ -12,7 +12,7 @@ $ bin/mqadmin updateNamesrvConfig -k orderMessageEnable -v true
```shell
$ bin/mqadmin updateTopic -w 8 -r 8 -a +cleanup.policy=COMPACTION -n localhost:9876 -t ctopic -o true -c DefaultCluster
create topic to 127.0.0.1:10911 success.
TopicConfig [topicName=ctopic, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={+delete.policy=COMPACTION}]
TopicConfig [topicName=ctopic, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={+cleanup.policy=COMPACTION}]
```
### produce message
@@ -25,7 +25,7 @@ producer.start();
String topic = "ctopic";
String tag = "tag1";
String key = "key1";
Message msg = new Message(topic, tag, key, "bodys"getBytes(StandardCharsets.UTF_8));
Message msg = new Message(topic, tag, key, "bodys".getBytes(StandardCharsets.UTF_8));
SendResult sendResult = producer.send(msg, (mqs, message, shardingKey) -> {
int select = Math.abs(shardingKey.hashCode());
if (select < 0) {
@@ -59,7 +59,7 @@ messageQueueList.forEach(mq -> {
Map<String, byte[]> kvStore = Maps.newHashMap();
while (true) {
List<MessageExt> msgList = consumer.poll(1000);
if (msgList != null) {
if (CollectionUtils.isNotEmpty(msgList)) {
msgList.forEach(msg -> kvStore.put(msg.getKeys(), msg.getBody()));
}
}