A tiny version of RocketMQ, inspired from houbb/mq.
Highlights several enhancements compared with houbb/mq here:
- fewer external dependencies, realize more built-in utilities
- for robustness, json parser/wrapper change from fastjson to Jackson
- generate Snowflake ID, instead of original UUID
- default message push relies on long polling, while original push only used for urgent message
- decoupling message transfer and consumption, therefore peak cut
- performance improvement and more reasonable implementation of details
- cleaner code, naming and structure, with more notes
Also fixed some bugs.
- RocketMQ 部分核心概念
- Topic、Tag 和 GroupName 概念介绍
- 消息“伪推送”模式解析(消费者长轮询,相当于掌握是否接受推送的主动权)
- Netty 入门知识点整理
- Netty 核心原理剖析与 RPC 实践
- ChannelPipeline 相关概念(包括 ChannelHandler 及 ChannelHandlerContext)
- 启动类 ServerBootstrap 和 Bootstrap
- bossGroup(parentGroup) 和 workerGroup(childGroup) 的作用及关系
- 数据发送方法 WriteAndFlush() 底层实现
- channelHandlerContext.close() 与 channel.close()
- eventLoopGroup.shutdownGracefully()
- Objects.requireNonNull() 方法:Fail-fast 设计**
- Jackson 要求反序列化的类提供无参构造函数
- Lambda 表达式
- 方法引用
- 线程池原理
- JDK 9+ 字符串拼接探究 (注:循环字符串拼接仍以提前创建 StringBuilder 复用为佳,因为循环 "+" 拼接字符串会重复创建 StringBuilder)
- 优雅关闭
- 参考命名规范