Spring系列學習之Spring Cloud Stream App Starters 應用程式啟動器
英文原文:https://cloud.spring.io/spring-cloud-stream-app-starters/
目錄
Spring Cloud Stream App Starters
使用Spring Boot 1.5.x + Spring Cloud Stream 1.3.x:
使用Spring Boot 2.0.x + Spring Cloud Stream 2.0.x:
使用Spring Boot 2.1.x + Spring Cloud Stream 2.1.x:
HTTP Repository Location for Apps
Spring Cloud Stream App Starters
Spring Cloud Stream Application Starters是基於Spring Boot的Spring Integration應用程式,可提供與外部系統的整合。 Spring Cloud Stream應用程式可與Spring Cloud Data Flow一起使用,以建立,部署和編排訊息驅動的微服務應用程式。
Spring Cloud Stream Application Starters是獨立的可執行應用程式,可通過Apache Kafka和RabbitMQ等訊息傳遞中介軟體進行通訊。 這些應用程式可以在各種執行時平臺上獨立執行,包括:Cloud Foundry,Apache Yarn,Apache Mesos,Kubernetes,Docker,甚至可以在您的膝上型電腦上執行。
特性
- 獨立執行作為Spring Boot應用程式
- 將微服務組合為Spring Cloud Data Flow中的流管道
- 將微服務應用程式用作maven或docker工件
- 通過命令列,環境變數或YAML檔案覆蓋配置引數
- 提供基礎架構以單獨測試應用程式
- 從此版本的
可用應用
Source | Processor | Sink |
---|---|---|
file | aggregator | aggregate-counter |
ftp | bridge | cassandra |
gemfire | filter | counter |
gemfire-cq | groovy-filter | field-value-counter |
http | groovy-transform | file |
jdbc | header-enricher | ftp |
jms | httpclient | gemfire |
load-generator | pmml | gpfdist |
loggregator | python-http | hdfs |
python-jython | hdfs-dataset | |
mongodb | scriptable-transform | jdbc |
mqtt | splitter | log |
rabbit | tasklaunchrequest-transform | mongodb |
s3 | tcp-client | mqtt |
sftp | tensorflow | pgcopy |
syslog | transform | rabbit |
tcp | twitter-sentiment | redis-pubsub |
tcp-client | grpc | router |
time | s3 | |
trigger | sftp | |
triggertask | task-launcher-cloudfoundry | |
twitterstream | task-launcher-local | |
task-launcher-dataflow | ||
task-launcher-yarn | ||
tcp | ||
throughput | ||
websocket |
快速開始
第1步 - 從這裡下載最新的基於Kafka 10的時間源應用程式[例如:/1.3.0.RELEASE/time-source-kafka-10-1.3.0.RELEASE.jar]
第2步 - 從這裡下載最新的基於Kafka 10的日誌接收器應用程式[例如:/1.3.0.RELEASE/log-sink-kafka-10-1.3.0.RELEASE.jar]
第3步 - 啟動Kafka 0.10.1.1
第4步 - 執行時間源並繫結到ticktock主題
java -jar time-source-kafka-***.jar --spring.cloud.stream.bindings.output.destination=ticktock
第5步 - 執行Log Sink並繫結到ticktock主題
java -jar log-sink-kafka-***.jar --spring.cloud.stream.bindings.input.destination=ticktock
第6步- 在控制檯中驗證ticktock日誌
流應用程式啟動器和Spring雲資料流(**)
使用Spring Boot 1.5.x + Spring Cloud Stream 1.3.x:
Artifact Type | Stable Release | Snapshot/Milestone Release |
---|---|---|
RabbitMQ + Maven | http://bit.ly/Celsius-SR3-stream-applications-rabbit-maven | http://bit.ly/Celsius-BUILD-SNAPSHOT-stream-applications-rabbit-maven |
RabbitMQ + Docker | http://bit.ly/Celsius-SR3-stream-applications-rabbit-docker | http://bit.ly/Celsius-BUILD-SNAPSHOT-stream-applications-rabbit-docker |
Apache Kafka 0.10 + Maven | http://bit.ly/Celsius-SR3-stream-applications-kafka-10-maven | http://bit.ly/Celsius-BUILD-SNAPSHOT-stream-applications-kafka-10-maven |
Apache Kafka 0.10 + Docker | http://bit.ly/Celsius-SR3-stream-applications-kafka-10-docker | http://bit.ly/Celsius-BUILD-SNAPSHOT-stream-applications-kafka-10-docker |
使用Spring Boot 2.0.x + Spring Cloud Stream 2.0.x:
Artifact Type | Stable Release | Snapshot/Milestone Release |
---|---|---|
RabbitMQ + Maven | http://bit.ly/Darwin-SR3-stream-applications-rabbit-maven | http://bit.ly/Darwin-BUILD-SNAPSHOT-stream-applications-rabbit-maven |
RabbitMQ + Docker | http://bit.ly/Darwin-SR3-stream-applications-rabbit-docker | http://bit.ly/Darwin-BUILD-SNAPSHOT-stream-applications-rabbit-docker |
Apache Kafka + Maven | http://bit.ly/Darwin-SR3-stream-applications-kafka-maven | http://bit.ly/Darwin-BUILD-SNAPSHOT-stream-applications-kafka-maven |
Apache Kafka + Docker | http://bit.ly/Darwin-SR3-stream-applications-kafka-docker | http://bit.ly/Darwin-BUILD-SNAPSHOT-stream-applications-kafka-docker |
使用Spring Boot 2.1.x + Spring Cloud Stream 2.1.x:
Artifact Type | Milestone Release | Snapshot Release |
---|---|---|
RabbitMQ + Maven | http://bit.ly/Einstein-M1-stream-applications-rabbit-maven | http://bit.ly/Einstein-BUILD-SNAPSHOT-stream-applications-rabbit-maven |
RabbitMQ + Docker | http://bit.ly/Einstein-M1-stream-applications-rabbit-docker | http://bit.ly/Einstein-BUILD-SNAPSHOT-stream-applications-rabbit-docker |
Apache Kafka + Maven | http://bit.ly/Einstein-M1-stream-applications-kafka-maven | http://bit.ly/Einstein-BUILD-SNAPSHOT-stream-applications-kafka-maven |
Apache Kafka + Docker | http://bit.ly/Einstein-M1-stream-applications-kafka-docker | http://bit.ly/Einstein-BUILD-SNAPSHOT-stream-applications-kafka-docker |
(**)通過檢視參考指南中的應用程式註冊部分,瞭解如何在Spring Cloud Data Flow中使用app-starters
HTTP Repository Location for Apps
RabbitMQ Apps
With Spring Boot 1.5.x:
With Spring Boot 2.0.x:
Apache Kafka Apps
With Spring Boot 1.5.x:
With Spring Boot 2.0.x:
With Spring Boot 2.1.x:
釋出版本
Spring Cloud Stream App Starters
Release
Documentation
Einstein M1
Einstein
Darwin SR3
Darwin
Celsius SR3