Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tangchen.tangchen committed Feb 11, 2020
2 parents 812b6cb + daee6c4 commit 3f80b2a
Show file tree
Hide file tree
Showing 26 changed files with 103 additions and 1,946 deletions.
Binary file removed markdown/image/rocketmq-store.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_1.png
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_10.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_11.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_12.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_2.png
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_3.png
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_4.png
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_5.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_6.png
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_7.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_8.jpg
Binary file not shown.
Binary file removed markdown/image/rocketmq_architecture_9.jpg
Binary file not shown.
Binary file removed markdown/image/sentinel-architecture_1.png
Binary file not shown.
Binary file removed markdown/image/sentinel-architecture_2.gif
Binary file not shown.
Binary file removed markdown/image/sentinel-architecture_3.png
Binary file not shown.
Binary file removed markdown/image/sentinel-dashboard.jpg
Binary file not shown.
Binary file removed markdown/image/sentinel-log_1.jpg
Binary file not shown.
Binary file removed markdown/image/spring-cloud-stream_0.png
Binary file not shown.
Binary file removed markdown/image/spring-cloud-stream_1.jpg
Binary file not shown.
Binary file removed markdown/image/spring-cloud-stream_2.png
Binary file not shown.
1,946 changes: 0 additions & 1,946 deletions markdown/第六章 Sentinel.md

This file was deleted.

35 changes: 35 additions & 0 deletions spring-cloud-rocketmq/stream-rocketmq-binder/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-cloud-rocketmq</artifactId>
<groupId>com.gupaoedu.book.rocketmq</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>stream-rocketmq-binder</artifactId>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!--<dependency>-->
<!--<groupId>com.alibaba.cloud</groupId>-->
<!--<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>-->
<!--</dependency>-->

<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rocketmq</artifactId>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.gupaoedu.book.stream.rocketmq;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.messaging.Source;

/**
* @author juede.tcever
*/
@SpringBootApplication
@EnableBinding({ Source.class, Sink.class })
public class Application {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.gupaoedu.book.stream.rocketmq.stream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
* @author juede.tcever
*/
//@RestController

@Component
public class ProduceController {
//
// @Autowired
// private StreamClient source;

@Autowired
private Source source;

// @StreamListener("input1")
// public void test(String message){
// System.out.println(message);
// }

@PostConstruct
private void init() throws InterruptedException {
MessageBuilder builder = MessageBuilder.withPayload("init...");
Message message = builder.build();
source.output().send(message);
System.out.println("init...");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
spring:
cloud:
stream:
rocketmq:
binder:
name-server: 127.0.0.1:9876
bindings:
output:
destination: TopicTest
group: PRODUCER_GROUP_TOPIC_TEST
server:
port: 8081

0 comments on commit 3f80b2a

Please sign in to comment.