🔥 FolkMQ v1.5.1 release ("new" domestic message middleware)

Source: contribution
2024-05-27 16:52:00

FolkMQ is a "new" message middleware. Emphasis: "small and smart", "simple and strong".

Function Summary

role function
Producer (client) Publish ordinary message, Qos0 message, scheduled message, sequential message, expirable message, transaction message, broadcast message
   
Consumer (client) Subscribe, unsubscribe. Consumption ACK (automatic, manual)
   
Server Publish Confirm, Subscribe Confirm, Unsubscribe Confirm, Distribute Retry, Distribute Delayed

Client language support

Java, Python, JavaScript (supports node.js backend and web front-end)

Transport protocol support

tcp、udp、websocket、kcp

Deployment Support

It can be embedded (the dependency package is 200Kb+), stand-alone, and clustered (the deployment package is 10Mb).

This update

  • Add broadcast message (add broadcast mode to the producer)
  • Add the operation of console "forced emptying" message
  • Add "fokmq: ws" adaptation websocket sub protocol verification (avoid random connection)
  • Add the cluster node panel of the "server broker" console to view the "memory usage"
  • Optimize memory control of asynchronous message production side
  • Optimize client lock processing. By default, no lock is changed to sequential lock
  • Sokcet. d rises to 2.5.1

For simple programming

1) Start Service

 docker run - p  eighteen thousand six hundred and two : eighteen thousand six hundred and two -p eight thousand six hundred and two : eight thousand six hundred and two noearorg/folkmq-server: one point five . one

2) Programming

  • Introduce a small dependency
 < dependency >
     < groupId > org.noear </ groupId >
     < artifactId > folkmq-transport-netty </ artifactId >
     < version > 1.5.1 </ version >
 </ dependency >
  • Write a program
 public  class  ClientDemo { public  static  void  main (String[] args)  throws Exception { //Create a client and connect
         MqClient  client  = FolkMQ.createClient( " folkmq://127.0.0.1:18602 " ) .nameAs( "demoapp" ) .connect(); //Subscribe to topics client.subscribe( "demo.topic" , message -> { System.out.println(message); }); //Publish general message client.publish( "demo.topic" , new  MqMessage ( "helloworld!" )); //Publish Qos0 message client.publish( "demo.topic" , new  MqMessage ( "helloworld!" ).qos( zero )); //Publish sequential messages client.publish( "demo.topic" , new  MqMessage ( "helloworld!" ).sequence( true )); //Publish broadcast message client.publish( "demo.topic" , new  MqMessage ( "helloworld!" ).broadcast( true )); //Publish timing message (or delay message) client.publish( "demo.topic" , new  MqMessage ( "helloworld!" ).scheduled(Datetime.Now().addDay( ten ))); //...... etc. } }

Code warehouse

Official website

Expand to read the full text
Click to join the discussion 🔥 (2) Post and join the discussion 🔥
two comment
four Collection
 Back to top
Top