Refactor Rocketmq: use StreamBridge.send() instead of functional producer
parent
677847a477
commit
029ea6fd53
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-examples</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>rocketmq-example-common</artifactId>
|
||||
<name>Spring Cloud Starter Stream Alibaba RocketMQ Example COMMON</name>
|
||||
<description>Some rocketMQ exmaple common codes</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
</project>
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2013-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.alibaba.cloud.examples.common;
|
||||
|
||||
/**
|
||||
* @author sorie
|
||||
*/
|
||||
public class SimpleMsg {
|
||||
|
||||
private String msg;
|
||||
|
||||
public SimpleMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
server:
|
||||
port: 28087
|
||||
spring:
|
||||
application:
|
||||
name: rocketmq-sql-consume-example
|
||||
cloud:
|
||||
stream:
|
||||
function:
|
||||
definition: producer;consumer;
|
||||
rocketmq:
|
||||
binder:
|
||||
name-server: localhost:9876
|
||||
bindings:
|
||||
producer-out-0:
|
||||
producer:
|
||||
group: output_1
|
||||
consumer-in-0:
|
||||
consumer:
|
||||
# tag: {@code tag1||tag2||tag3 }; sql: {@code 'color'='blue' AND 'price'>100 } .
|
||||
subscription: sql:(color in ('red1', 'red2', 'red4') and price>3)
|
||||
bindings:
|
||||
producer-out-0:
|
||||
destination: sql
|
||||
consumer-in-0:
|
||||
destination: sql
|
||||
group: sql-group
|
||||
logging:
|
||||
level:
|
||||
org.springframework.context.support: debug
|
Loading…
Reference in New Issue