FolkMQ 是个“新式”的消息中间件。强调:“简而强”。可内嵌,可单机,可集群(部署包为 9Mb)。
Java、Python、JavaScript(支持 node.js 后端,web 前端)
tcp、udp、websocket、kcp
docker run -p 18602:18602 -p 8602:8602 noearorg/folkmq-server:1.6.0
<dependency> <groupId>org.noear</groupId> <artifactId>folkmq-transport-netty</artifactId> <version>1.6.0</version> </dependency>
public class ClientDemo { public static void main(String[] args) throws Exception { //创建客户端,并连接 MqClient client = FolkMQ.createClient("folkmq://127.0.0.1:18602") .nameAs("demoapp") .connect(); //订阅主题 client.subscribe("demo.topic", message -> { System.out.println(message); }); //发布普通消息 client.publish("demo.topic", new MqMessage("helloworld!")); //发布Qos0消息 client.publish("demo.topic", new MqMessage("helloworld!").qos(0)); //发布顺序消息 client.publish("demo.topic", new MqMessage("helloworld!").sequence(true)); //发布广播消息 client.publish("demo.topic", new MqMessage("helloworld!").broadcast(true)); //发布定时消息(或延时消息) client.publish("demo.topic", new MqMessage("helloworld!").scheduled(Datetime.Now().addDay(10))); //......等 } }
评论删除后,数据将无法恢复
🔥 FolkMQ 1.6.0(体验简单的消息中间件)
FolkMQ 是个“新式”的消息中间件。强调:“简而强”。可内嵌,可单机,可集群(部署包为 9Mb)。
功能简表
客户端语言支持
Java、Python、JavaScript(支持 node.js 后端,web 前端)
传输协议支持
tcp、udp、websocket、kcp
本次更新
面向简单编程
1) 启动服务
2) 编写程序
代码仓库
官网