Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
guoshiqiufeng committed Mar 14, 2024
1 parent 39d31d5 commit 2422b2b
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ public String customSend2() {
return "success";
}

@GetMapping("customSend3")
public String customSend3() {
TestEntity entity = new TestEntity();
entity.setId("9521");
entity.setMessage("test");
String messageId = testMapper.customSend3(entity);
log.debug("send messageId:{}", messageId);
return "success";
}

@GetMapping("customAsyncSend")
public String customAsyncSend() throws ExecutionException, InterruptedException {
TestEntity entity = new TestEntity();
Expand All @@ -65,4 +75,4 @@ public String customAsyncSend() throws ExecutionException, InterruptedException
log.debug("send messageId:{}", messageId);
return "success";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public interface TestMapper extends BaseMapper<TestEntity> {
@SendMessage(topic = "loki", tag = "custom", message = "#entity.message", messageKey = "#entity.id")
String customSend2(TestEntity entity);

@SendMessage(topic = "loki", tag = "custom", message = "#entity.message", messageKey = "#entity.id", deliveryTimestamp = 10000)
String customSend3(TestEntity entity);

@SendMessage(topic = "loki", tag = "custom", async = true, message = "#entity.message", messageKey = "#entity.id")
CompletableFuture<String> customAsyncSend(TestEntity entity);

Expand Down
20 changes: 20 additions & 0 deletions loki-redis-test/src/main/resources/application-sentinel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
spring:
data:
redis:
sentinel:
master: mymaster
nodes:
- 127.0.0.1:26380
- 127.0.0.1:26379
- 127.0.0.1:26381
password: 123456
password: 123456
database: 12

loki:
global-config:
mq-config:
mq-type: redis
address: mymaster,127.0.0.1:26380,127.0.0.1:26379,127.0.0.1:26381
auth: true
password: 123456
15 changes: 15 additions & 0 deletions loki-redis-test/src/main/resources/application-single.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
spring:
data:
redis:
host: 127.0.0.1
#password: 123456
database: 12

loki:
global-config:
mq-config:
mq-type: redis
address: 127.0.0.1:6379
auth: false
password: 123456
redis-history-delay-message-send: true
21 changes: 2 additions & 19 deletions loki-redis-test/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,5 @@ logging:
io.github.guoshiqiufeng.lokitest: debug

spring:
data:
redis:
sentinel:
master: mymaster
nodes:
- 127.0.0.1:26380
- 127.0.0.1:26379
- 127.0.0.1:26381
password: 123456
password: 123456
database: 12

loki:
global-config:
mq-config:
mq-type: redis
address: mymaster,127.0.0.1:26380,127.0.0.1:26379,127.0.0.1:26381
auth: true
password: 123456
profiles:
active: single
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<java.version>17</java.version>
<loki.version>1.0.1</loki.version>
<loki.version>1.1.0</loki.version>
</properties>

<dependencyManagement>
Expand Down

0 comments on commit 2422b2b

Please sign in to comment.