Giter Site home page Giter Site logo

micromq's Introduction

Background

MicroMQ is a lightweight message queue system whose code lines are only about 3K. This project is aimed to help those programmer beginners learn how to build a complete system which may include storage, HTTP interface, configuration, background task, and so on. It is base on Spring Boot, and uses MySQL as default storage. You can also extend it to use other storages like Redis.

Install

It is a learning project, and not well tested. If you want to deploy it on production environment, please completely test it first. You can learn it, run it, modify it by using IDEA and maven. Just import it into IDEA and try it as your will.

Usage

  1. install mysql, and create necessary tables, SQL script file can be found under directory './src/main/resources/script/MicroMQ.sql'
  2. use maven or IDEA to build the project
  3. change the configuration under directory './src/main/resources/config'
  4. run the project through IDEA, main class is: MQBootstrap
  5. access 'http://localhost:8080' to try some operations.

How to learn

  1. knowledge about Spring Boot
  2. knowledge about MySQL
  3. key classes: MQNode, MQOperation, MQClient, MQQueue; key interface: IPull, ISave, NodeGroupStrategy, IMessageDao, IReceiptDao
  4. access 'http://localhost:8080' to try some operations, access mysql to check the data

Extend

You can extend the following features:

  1. storage: just implement IMessageDao and IReceiptDao, and then initiate storage at MQNode.build function.
  2. group: just implement NodeGroupStrategy, and then initiate group strategy at MQNode.build function.
  3. queue mode: implement IPull to add new kind of pull operation, implement ISave to add new kind of save mode for queue.
  4. more functions: add more Spring Boot controllers to support new functions.

Maintainers

Wallace <[email protected]>

License

Apache License 2.0

micromq's People

Contributors

dependabot[bot] avatar yunhua-lee 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.