Coder Social home page Coder Social logo

lightmq's Introduction

lightMQ

由java构建的轻量级消息队列

特点

构建简单,纯java编写

使用方便,使用客户端可以直接通过注解监听

使用步骤

  1. 注册topic
  2. 如采用发布订阅方式,需要注册group
  3. 发送消息
  4. 消费消息

消费模式

  1. 非阻塞消费,无消息直接返回null
  2. 阻塞消费,无消息进入阻塞

生产模式

  1. 顺序生产,采用同步策略,速度较慢
  2. 非顺序生产,采用异步策略,速度较快

提供接口

  1. registerTopic 注册topic,传入topic
  2. registerGroup 注册group,传入topic和group
  3. produce 生产消息,传入topic,key,value,key可不传
  4. consume 消费消息,传入group,topic,group可不传,默认消费master
  5. getAllTopic 获取所有topic

客户端地址

https://github.com/stalary/lightMQ-client

部署方式

  • 物理机启动

mvn clean install

java -jar target/lightmq-0.1.jar

  • docker启动

docker run --rm --name lightmq -p 8001:8001 -d stalary/lightmq

lightmq's People

Contributors

stalary avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.