定义别名
This commit is contained in:
@@ -7,13 +7,16 @@ spring:
|
||||
cloud:
|
||||
stream:
|
||||
bindings:
|
||||
sink1-in-0:
|
||||
send1:
|
||||
destination: test2
|
||||
sink2-in-0:
|
||||
send2:
|
||||
destination: test3
|
||||
function:
|
||||
definition: sink1;sink2
|
||||
|
||||
function:
|
||||
# 定义别名
|
||||
bindings:
|
||||
sink1-in-0: send1
|
||||
sink2-in-0: send2
|
||||
definition: sink1;sink2
|
||||
|
||||
server:
|
||||
port: 8081
|
||||
@@ -21,13 +21,13 @@ public class Producer {
|
||||
|
||||
@RequestMapping("/send1")
|
||||
public String send1() {
|
||||
streamBridge.send("source1-out-0", new Date());
|
||||
streamBridge.send("send1", new Date());
|
||||
return "success1";
|
||||
}
|
||||
|
||||
@RequestMapping("/send2")
|
||||
public String send2() {
|
||||
streamBridge.send("source2-out-0", LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
||||
streamBridge.send("send2", LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
||||
return "success2";
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,16 @@ spring:
|
||||
cloud:
|
||||
stream:
|
||||
bindings:
|
||||
source1-out-0:
|
||||
send1:
|
||||
destination: test2
|
||||
source2-out-0:
|
||||
send2:
|
||||
destination: test3
|
||||
function:
|
||||
definition: source1;source2
|
||||
function:
|
||||
# 定义别名
|
||||
bindings:
|
||||
source1-in-0: send1
|
||||
source2-in-0: send2
|
||||
definition: source1;source2
|
||||
|
||||
|
||||
server:
|
||||
|
||||
Reference in New Issue
Block a user