Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dankal-test-kafka
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
仲光辉
dankal-test-kafka
Commits
d670e50f
Commit
d670e50f
authored
Feb 04, 2021
by
仲光辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: remove temp doc
parent
46758e47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
46 deletions
+1
-46
蛋壳创意科技-技术测试-SpringCloud.md
蛋壳创意科技-技术测试-SpringCloud.md
+1
-46
No files found.
蛋壳创意科技-技术测试-SpringCloud.md
deleted
100644 → 0
View file @
46758e47
# 蛋壳创意科技-技术测试-SpringCloud
++ /dev/null
# 蛋壳创意科技-技术测试-SpringCloud
> company: [蛋壳创意科技](https://www.dankal.cn/)
>
> code: [dankal-test-kafka](http://git.dankal.cn/mercyModest/dankal-test-kafka.git)
>
> spring-kafka-doc: [spring-cloud-stream-2.1.x](https://github.com/spring-cloud/spring-cloud-stream/blob/2.1.x/docs/src/main/asciidoc/spring-cloud-stream.adoc)
>
## 前景小述
[
Spring Cloud Stream
](
https://github.com/spring-cloud/spring-cloud-stream/tree/2.1.x
)
是一个用于构建基于
**消息**
的微服务应用框架,使用 Spring Integration与 Broker 进行连接。
> 啥是`Broker`?
>
> 一般来说,消息队列中间件都有一个 **Broker Server**(代理服务器),消息中转角色,负责存储消息、转发消息。
>
> 例如说在 RocketMQ 中,Broker 负责接收从生产者发送来的消息并存储、同时为消费者的拉取请求作准备。另外,Broker 也存储消息相关的元数据,包括消费者组、消费进度偏移和主题和队列消息等。
Spring Cloud Stream 提供了消息中间件的
**统一抽象**
,推出了 publish-subscribe、consumer groups、partition 这些统一的概念。
Spring Cloud Stream 内部有两个概念:
**Binder**
和
**Binding**
。
① Binder,跟消息中间件集成的组件,用来创建对应的 Binding。各消息中间件都有自己的 Binder 具体实现。
```
java
public
interface
Binder
<
T
,
// 消费者配置
C
extends
ConsumerProperties
,
// 生产者配置
P
extends
ProducerProperties
>
{
// 创建消费者的 Binding
Binding
<
T
>
bindConsumer
(
String
name
,
String
group
,
T
inboundBindTarget
,
C
consumerProperties
);
// 创建生产者的 Binding
Binding
<
T
>
bindProducer
(
String
name
,
T
outboundBindTarget
,
P
producerProperties
);
}
```
② Binding,包括 Input Binding 和 Output Binding。Binding 在消息中间件与应用程序提供的 Provider 和 Consumer 之间提供了一个桥梁,实现了开发者只需使用应用程序的 Provider 或 Consumer 生产或消费数据即可,屏蔽了开发者与底层消息中间件的接触。
!
[
](https://img.mercymodest.com/public/20210130110316.png)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment