为了学习而造的 mq 轮子。
- 初始架构:broker、client(producer、consumer)
- 支持 topic(主题),暂不支持消费者/分区/多队列
- broker 和 client 独立部署,用网络请求生产/消费消息
- broker 先用单机模式,暂不支持集群
- 消息存放到内存,暂不持久化
- 暂不开发 nameserver / 注册中心,客户端和 broker 先直连
- 消息使用硬盘持久化
- 启动 broker:
ccx-mq-broker
的BrokerBootstrap
- 启动客户端 Demo:
ccx-mq-demo
的DemoBootstrap
,是一个 Web - 调用
http://localhost:8080/producer/send?msg=hello
发送消息 - 调用
http://localhost:8080/consumer/pull?count=10
拉消息 - 调用
http://localhost:8080/consumer/updateOffset?offset=1
更新位移
- Fork 本仓库
- 新建分支
- 提交代码
- 新建 Pull Request