本文档主要介绍如何基于rocketmq-streams快速搭建流处理任务,搭建过程中某些例子会用到rocketmq,可以参考rocketmq搭建文档
git clone https://github.com/apache/rocketmq-streams.git cd rocketmq-streams mvn clean -DskipTests install -U
<dependency> <groupId>org.apache.rocketmq</groupId> <artifactId>rocketmq-streams-clients</artifactId> </dependency>
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <minimizeJar>false</minimizeJar> <shadedArtifactAttached>true</shadedArtifactAttached> <artifactSet> <includes> <include>org.apache.rocketmq:rocketmq-streams-clients</include> </includes> </artifactSet> </configuration> </execution> </executions> </plugin> </plugins> </build>
快速编写一个统计页面点击次数的小程序:Please see the rocketmq-streams-examples
java -jar XXXX-shade.jar \ -Dlog4j.level=ERROR \ -Dlog4j.home=/logs \ -Xms1024m \ -Xmx1024m