Coder Social home page Coder Social logo

watchman-1's Introduction

Feature 特性

  • 高性能。在 macbook pro 15 上测试,每个队列的处理能力可以轻松达到 3000 message/second 以上,多个队列也可以做到线性的增加性能,整体应用达到几万每秒很轻松。同时,得益于 golang 的协程设计,如果下游出现了慢调用,那么也不会影响并发。
  • 优雅关闭。通过对信号的监听,整个程序可以在不丢消息的情况下优雅关闭,利于配置更改和程序重启。这个在生产环境非常重要。
  • 自动重连。当 RabbitMQ 服务无法连接的时候,应用可以自动重连。

Usage 使用

Build

go build -o watchman

Usage

Usage of ./watchman:
  -c string
        config file path (default "config/queues.example.yml")
  -log string
        logging file, default STDOUT
  -pidfile string
        If specified, write pid to file.

优雅关闭:

# kill -QUIT $PID

config 配置

ENV 文件

使用前需要先加载 env,样例见 config/env.example.yml,主要是 RabbitMQ 的配置。

队列配置文件

样例见 config/queues.example.yml, 主要是注明消息队列的配置以及回调地址和参数。

Author 作者

大鱼(fishtrip.cn) 是国内领先的全球民宿平台,给用户提供全球特色的民宿、客栈、别墅等非标准住宿。目前公司的技术栈以 ruby 和 Java 为主,部分中间件采用 golang 编写。

Licence 许可

MIT Licence

watchman-1's People

Contributors

zamia avatar

Watchers

zbv 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.