File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
content/post/redis_in_action_09_redis_practical_cases Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- title : 基于Docker的Redis实战-Redis综合实践案例
2
+ title : 基于Docker的Redis实战-Redis消息队列、分布式锁、限流、压力测试综合实践案例
3
3
description :
4
4
slug : redis_in_action_09_redis_practical_cases
5
5
date : 2024-08-18
@@ -123,6 +123,7 @@ punsubscribe [pattern [pattern ...]]
123
123
创建一个Publisher类,用于发布消息。
124
124
125
125
` ` ` java
126
+
126
127
public class Publisher {
127
128
/**
128
129
* 主函数入口
@@ -147,9 +148,11 @@ public class Publisher {
147
148
jedis.publish(" MQChannel" , jsonString);
148
149
}
149
150
}
151
+
150
152
` ` `
151
153
152
154
创建一个Subscriber类,该类继承JedisPubSub抽象类,用于订阅消息、接收消息、取消订阅。
155
+
153
156
` ` ` java
154
157
public class Subscriber extends JedisPubSub {
155
158
/**
@@ -426,7 +429,7 @@ public class LimitRequestDemo {
426
429
请求过于频繁,请稍后再试
427
430
` ` `
428
431
429
- # ### 4 .Redis压力测试实战
432
+ # ## 四 .Redis压力测试实战
430
433
431
434
` ` ` sh
432
435
redis-benchmark [option] [optiion value]
You can’t perform that action at this time.
0 commit comments