GithubHelp home page GithubHelp logo

mpns's Introduction

mpns 业务消息推送系统

说明由于该系统是一个偏向业务的系统,所以本工程只是一个样例工程,具体的业务逻辑还需要业务方自己实现。

ps:由于本工程目前依赖的mpush-client:0.0.4还没有发布

要先到mpush git checkout dev分支

然后执行命令mvn clean install -Ppub

mpush-client:0.0.4安装到本地maven仓库

源码启动

  1. 本工程使用vert.x + spring 实现,需要了解一些vert.x的知识
  2. 修改配置文件conf-xxx.properties主要修改Zookeeper配置
  3. Main方法启动com.mpush.mpns.web.AppMain.java

独立部署

  1. 打包 mvn clean package -Ponline
  2. 打好的包位置: mpns-web/target/mpns-release.tar.gz
  3. 解压 tar -zvxf mpns-release.tar.gz
  4. 后台启动 java -jar mpns.jar start
  5. 停止服务 java -jar mpns.jar stop appId

appId为start后控制台输出的那个字符串

如过不知道appId可以先执行下java -jar mpns.jar stop 控制台会输出

  1. 查看帮助 java -jar mpns.jar -h
  2. 前台启动 java -jar mpns.jar

对外接口

详细参加com.mpush.mpns.web.handler.AdminHandler

  1. http://127.0.0.1:8080/api/admin/push.json?userId=user-0&content=test 模拟给指定用户发送push
  2. http://127.0.0.1:8080/api/admin/list/servers.json 查询mpush server 列表
  3. http://127.0.0.1:8080/api/admin/get/onlineUserNum.json?ip=120.23.43.1 查询mpushServer在线用户数

mpns's People

Contributors

ohun avatar

Watchers

James Cloos avatar  avatar  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.