All Projects → snail007 → wmq

snail007 / wmq

Licence: GPL-3.0 license
Wrapped message queue which based on rabbitmq,support http protocol

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to wmq

Vernemq
A distributed MQTT message broker based on Erlang/OTP. Built for high quality & Industrial use cases.
Stars: ✭ 2,628 (+9633.33%)
Mutual labels:  message-queue
coronamq
The simplest way to implement a task queue with Java, Vertx and PostgreSQL.
Stars: ✭ 23 (-14.81%)
Mutual labels:  message-queue
haraqa
High Availability Routing and Queueing Application
Stars: ✭ 50 (+85.19%)
Mutual labels:  message-queue
Nats.c
A C client for NATS
Stars: ✭ 220 (+714.81%)
Mutual labels:  message-queue
Kmq
Kafka-based message queue
Stars: ✭ 239 (+785.19%)
Mutual labels:  message-queue
microq
Micro job queue built on mongo
Stars: ✭ 67 (+148.15%)
Mutual labels:  message-queue
Qmq
QMQ是去哪儿网内部广泛使用的消息中间件,自2012年诞生以来在去哪儿网所有业务场景中广泛的应用,包括跟交易息息相关的订单场景; 也包括报价搜索等高吞吐量场景。
Stars: ✭ 2,420 (+8862.96%)
Mutual labels:  message-queue
aop
AMQP on Pulsar protocol handler
Stars: ✭ 93 (+244.44%)
Mutual labels:  message-queue
Advanced Java
😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
Stars: ✭ 59,142 (+218944.44%)
Mutual labels:  message-queue
core
Simple JSON-based messaging queue for inter service communication
Stars: ✭ 28 (+3.7%)
Mutual labels:  message-queue
Akka Rabbitmq
RabbitMq client in Scala and Akka actors
Stars: ✭ 228 (+744.44%)
Mutual labels:  message-queue
Enqueue Bundle
[READ-ONLY] Message queue bundle for Symfony. RabbitMQ, Amazon SQS, Redis, Service bus, Async events, RPC over MQ and a lot more
Stars: ✭ 233 (+762.96%)
Mutual labels:  message-queue
iris
Lightweight Component Model and Messaging Framework based on ØMQ
Stars: ✭ 50 (+85.19%)
Mutual labels:  message-queue
Sidekiq monitor
Advanced monitoring for Sidekiq
Stars: ✭ 220 (+714.81%)
Mutual labels:  message-queue
fs
[READ-ONLY] Enterprise queue solutions for PHP. Filesystem transport.
Stars: ✭ 32 (+18.52%)
Mutual labels:  message-queue
Phpnats
A PHP client for the NATSio cloud messaging system.
Stars: ✭ 209 (+674.07%)
Mutual labels:  message-queue
SPSC Queue
A highly optimized single producer single consumer message queue C++ template
Stars: ✭ 185 (+585.19%)
Mutual labels:  message-queue
tips
TiKV based Pub/Sub server
Stars: ✭ 31 (+14.81%)
Mutual labels:  message-queue
psychiq
Background job processing for Common Lisp
Stars: ✭ 45 (+66.67%)
Mutual labels:  message-queue
nodejs-integration-tests-best-practices
✅ Beyond the basics of Node.js testing. Including a super-comprehensive best practices list and an example app (April 2022)
Stars: ✭ 2,842 (+10425.93%)
Mutual labels:  message-queue

WMQ

stable license download_count download
Wrapped message queue which based on rabbitmq,support http protocol
struct

Requirement

Linux are recommended,on windows the api "12.get or search last 100 lines log content" cannot be worked.

Notes

You can find pre-complied binary here https://gitee.com/snail/wmq-go/releases or https://github.com/snail007/wmq/releases
This is a web ui based console to manage wmq , https://github.com/phachon/wmq-admin
Thx @phachon

Usage:

Usage of wmq:
--api-disable                  disable api service
--api-token string             access api token (default "guest")
--data-example                 print example of data-file
--data-file string             which file will store messages (default "message.json")
--fail-wait int                access consumer url  fail and then how many milliseconds 
                               to sleep (default 50000)
--ignore-headers stringSlice   these http headers will be ignored when access to consumer's url,
                               multiple splitted by comma(,)
--level string                 console log level,should be one of debug,info,warn,error 
                               (default "debug")
--listen-api string            api service listening port (default "0.0.0.0:3302")
--listen-publish string        publish service listening port (default "0.0.0.0:3303")
--log-access                   access log on or off (default true)
--log-dir string               the directory which store log files (default "log")
--log-level stringSlice        log to file level,multiple splitted by comma(,) 
                               (default [info,error,debug])
--log-max-count int            log file max count for rotate to remain (default 3)
--log-max-size int             log file max size(bytes) for rotate (default 102400000)
--mq-host string               which host be used when connect to RabbitMQ (default "127.0.0.1")
--mq-password string           which password be used when connect to RabbitMQ (default "guest")
--mq-port int                  which port be used when connect to RabbitMQ (default 5672)
--mq-prefix string             the queue and exchange default prefix (default "wmq.")
--mq-username string           which username be used when connect to RabbitMQ (default "guest")
--mq-vhost string              which vhost be used when connect to RabbitMQ (default "/")
--realip-header string         the publisher's real ip will be set in this http header when 
                                access to consumer's url (default "X-Forwarded-For")
--version                      show version about current WMQ

Publishing Message

note:default publish port is 3303
1.publish a message 
    note:any "post body" and "get parameters" and "http header" was send to 
        "publishing" , them will be the same as when wmq access consumer's URL
    request:
        protocol:http
        method:get or post
        path:/:name?:query_string     //:name is the name of message ,
                                        :query_string is any query string you need
        header:
            Token:string        //message's Token , if not need token ,leave it empty
            RouteKey:string     //message's routing key , if not need token ,leave it empty
    response:
        httpcode:204|500      //204:menas success 500:means fail and output is error info

Management

note:default manage port is 3302
1.add a message
    request:
        protocol:http
        method:get
        path:/message/add
        parameters:
            Name:string     //message name,must be unique
            Comment:string  //comment 
            Durable:1|0     //durable or not,1:true,0:false
            IsNeedToken:1|0 //need token or not when publish this kind message,1:true,0:false
            Mode:string     //should be one of fanout,topic,direct
            Token:string    //should be set when IsNeedToken is 1,other leave empty
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"}) 
2.update a message
    request:
        protocol:http
        method:get
        path:/message/update
        parameters:
            Name:string     //message name
            Comment:string  //comment 
            Durable:1|0     //durable or not,1:true,0:false
            IsNeedToken:1|0 //need token or not when publish this kind message,1:true,0:false
            Mode:string     //should be one of fanout,topic,direct
            Token:string    //should be set when IsNeedToken is 1,other leave empty
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"}) 
3.delete a message
    request:
        protocol:http
        method:get
        path:/message/delete
        parameters:
            Name:string     //message name
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"}) 
4.add a consumer
    request:
        protocol:http
        method:get
        path:/consumer/add
        parameters:
            Name:string     //message name
            URL:string      //URL of consume message
            Timeout:int     // milliseconds waiting for response when access url , usually : 3000
            Code:int        //http code,this code decide the url is accessed success or fail,
                              usually it is 200
            CheckCode:1|0   //whether to check response http code when access url,1:true,0:false
            Comment:string  //comment of consumer
            RouteKey:string //routing key
            Token:string    //should be set when IsNeedToken is 1,other leave empty
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"}) 
5.update a consumer
    request:
        protocol:http
        method:get
        path:/consumer/update
        parameters:
            Name:string     //message name
            ID:string       //ID of consumer
            URL:string      //URL of consume message
            Timeout:int     //milliseconds waiting for response when access url ,
                               usually : 3000
            Code:int        //http code,this code decide the url is accessed success or fail,
                              usually it is 200
            CheckCode:1|0   //whether to check response http code when access url,1:true,0:false
            Comment:string  //comment of consumer
            RouteKey:string //routing key
            Token:string    //should be set when IsNeedToken is 1,other leave empty
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,
                              if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"})
6.delete a consumer
    request:
        protocol:http
        method:get
        path:/consumer/delete
        parameters:
            Name:string     //message name
            ID:string       //ID of consumer
            api-token:string//the api token is setting in config
            callback:string //callback function name for jsonp call,
                              if no jsonp call ,leave it empty
    response:
        type:json
        column:
            code:1|0    //1 means success , 0 means fail
        example:
            no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
            jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"}
7.restart service
    request:
            protocol:http
            method:get
            path:/restart
            parameters:
                api-token:string    //the api token is setting in config
                callback:string     //callback function name for jsonp call,
                                      if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"})
8.reload service
    request:
            protocol:http
            method:get
            path:/reload
            parameters:
                api-token:string    //the api token is setting in config
                callback:string     //callback function name for jsonp call,
                                      if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:{code:1,data:null} or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:null}) or callbackxxx({code:0,data:"some error"})
9.get messages config  
    request:
            protocol:http
            method:get
            path:/config
            parameters:
                api-token:string    //the api token is setting in config
                callback:string     //callback function name for jsonp call,
                                      if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:
                        {
                            "code": 1, 
                            "data": [{
                                        "Durable": false,
                                        "IsNeedToken": true,
                                        "Mode": "topic",
                                        "Name": "test",
                                        "Token": "JQJsUOqYzYZZgn8gUvs7sIinrJ0tDD8J"
                                        "Comment": "",
                                        "Consumers": [{
                                                "Comment": "",
                                                "ID": "111",
                                                "Code": 200,
                                                "CheckCode": true,
                                                "RouteKey": "#",
                                                "Timeout": 5000,
                                                "URL": "http://test.com/wmq.php"
                                            }
                                        ],
                                    }]
                        }
                 or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:[...]}) or callbackxxx({code:0,data:"some error"})
10.get a consumer status
    request:
            protocol:http
            method:get
            path:/consumer/status
            parameters:
                Name:string         //message name
                ID:string           //consumer's ID
                api-token:string    //the api token is setting in config
                callback:string     //callback function name for jsonp call,
                                      if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:
                            {
                                "code": 1, 
                                "data": {
                                    "Count": 0, 
                                    "ID": "111", 
                                    "LastTime": "1496480916", 
                                    "MsgName": "test"
                                }
                            }
                 or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:[...]}) or callbackxxx({code:0,data:"some error"})
11.get all consumer status of a message
    request:
            protocol:http
            method:get
            path:/message/status
            parameters:
                Name:string         //message name
                api-token:string    //the api token is setting in config
                callback:string     //callback function name for jsonp call,
                                      if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:
                            {
                                "code": 1, 
                                "data": [
                                    {
                                        "Count": 0, 
                                        "ID": "111", 
                                        "LastTime": "1496480916", 
                                        "MsgName": "test"
                                    }, 
                                    {
                                        "Count": 0, 
                                        "ID": "222", 
                                        "LastTime": "1496480916", 
                                        "MsgName": "test"
                                    }
                                ]
                            }
                 or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:[...]}) or callbackxxx({code:0,data:"some error"})
12.get or search last 100 lines log content
    request:
            protocol:http
            method:get
            path:/log
            parameters:
                keyword:string           //keyword to search
                type:string             //should be one of: info,error,debug
                api-token:string        //the api token is setting in config
                callback:string         //callback function name for jsonp call,
                                            if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:
                            {
                                "code": 1, 
                                "data":"log content"
                            }
                 or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:[...]}) or callbackxxx({code:0,data:"some error"})
13.get all log file names
    request:
            protocol:http
            method:get
            path:/log/list
            parameters:
                api-token:string        //the api token is setting in config
                callback:string         //callback function name for jsonp call,
                                            if no jsonp call ,leave it empty
    response:
            type:json
            column:
                code:1|0    //1 means success , 0 means fail
            example:
                no jsonp:{"code":1,"data":["error.log","info.log"]}
                 or {code:0,data:"some error"} 
                jsonp:callbackxxx({code:1,data:[...]}) or callbackxxx({code:0,data:"some error"})
14.download a log file
    request:
            protocol:http
            method:get
            path:/log/file
            parameters:
                file:string             //filename of log file,such as : info.log 、debug.tar.gz
                api-token:string       //the api token is setting in config
    response:
            your browser will tip download file
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].