REST API for RabbitMQ, Write with Google Go(lang).

RabbitMQ HTTP API

REST HTTP API for RabbitMQ, it's not RabbitMQ Management Plugin.

Status:

Under active development.

Required:
* RabbitMQ (2.8+)
* Go(lang) (1.0.3)
Install:
$ go get github.com/streadway/amqp
$ go get github.com/smallfish/rabbitmq-http
Usage
  • Start HTTP Server (see your $GOPATH/bin):

      # $GOPATH/bin/rabbitmq-http -address="127.0.0.1:8080" -amqp="amqp://guest:guest@localhost:5672/"
    
HTTP Response
200 OK
405 Method Not Allowed
500 Internal Server Error
API List
Exchange
  • create new exchange:

      $ curl -i -X POST http://127.0.0.1:8080/exchange -d \
      '{"name": "e1", "type": "topic", "durable": true, "autodelete": false}'
       
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:45:47 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      declare exchange ok
    
  • delete exchange:

      $ curl -i -X DELETE http://127.0.0.1:8080/exchange -d \
      '{"name": "e1"}'
      
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:46:21 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      delete exchange ok
    
Message
  • publish new message:

      $ curl -i -X POST "http://127.0.0.1:8080/publish" -d \
      '{"exchange": "e1", "key": "bb", "deliverymode": 1, "priority": 99, "body": "hahaha"}'
    
      HTTP/1.1 200 OK
      Date: Mon, 25 Mar 2013 11:56:22 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      publish message ok
    
Queue
  • create new queue:

      $ curl -i -X POST http://127.0.0.1:8080/queue -d \
      '{"name": "q1"}'
      
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:47:11 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      declare queue ok
    
  • delete queue:

      $ curl -i -X DELETE http://127.0.0.1:8080/queue -d \
      '{"name": "q1"}'
      
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:48:05 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      delete queue ok
    
  • bind keys to queue:

      $ curl -i -X POST http://127.0.0.1:8080/queue/bind -d \
      '{"queue": "q1", "exchange": "e1", "keys": ["aa", "bb", "cc"]}'
      
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:48:43 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      bind queue ok
    
  • unbind keys to queue:

      $ curl -i -X DELETE http://127.0.0.1:8080/queue/bind -d \
      '{"queue": "q1", "exchange": "e1", "keys": ["aa", "cc"]}'
      
      HTTP/1.1 200 OK
      Date: Thu, 21 Mar 2013 05:49:05 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      unbind queue ok
    
  • consume queue:

      $ curl -i -X GET "http://127.0.0.1:8080/queue?name=q1" # more queues: "/queue?name=q1&name&q2"
    
      HTTP/1.1 200 OK
      Date: Fri, 22 Mar 2013 04:11:59 GMT
      Transfer-Encoding: chunked
      Content-Type: text/plain; charset=utf-8
    
      <DATA>\n
      <DATA>\n
      ...
    
Copyright and License

rabbitmq-http is licensed under the BSD license.

Owner
陈小玉
Engineer@滴滴 | ex-Alibaba/Alipay
陈小玉
Similar Resources

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Oct 10, 2021

A REST API with GET/POST Endpoints

Instagram-Backend-API(NO EXTRA DEPENDENCIES) Designed and Developed an HTTP JSON REST API mocking of instagram posts and users schema which capable of

Oct 10, 2021

REST API of Instagram's functionalities; developed using GO (and Mongo).

REST API of Instagram's functionalities; developed using GO (and Mongo).

Instagram-backend-api REST API of Instagram's functionalities; developed using GO (and Mongo). Constraints: Complete API has been developed using Go M

Oct 9, 2021

A fully-featured REST API developed in Golang for an online book store.

A fully-featured REST API developed in Golang for an online book store.

Oct 20, 2022

A fully-featured REST API developed in Golang for an online book store.

E-book Store A fully-featured REST API developed in Golang for an online book store. API Documentation Features Authentication (Sign up, Login and Res

Oct 20, 2022

Implement a REST API to drive a UI for service management

An implementation an API of the specification the drive a UI for engaging with services of an organization.

Nov 3, 2021

Rest API Product using Postgre as RDBMS

Rest API Product using Postgre as RDBMS

API Specification General info This is Rest API Product using Postgre as RDBMS. Tools? Please read the go.mod file. DDL CREATE TABLE products ( id bp

Nov 5, 2021

This is application for Book Keeping which implements fully-fledged REST API

This is application for Book Keeping which implements fully-fledged REST API #We are using Gorilla Mux

Dec 28, 2021

REST-API specifically build to support online store system of Zahir

REST-API specifically build to support online store system of Zahir

Rest Test. • From Above ERD please create Rest full API. Create register API(Include Generate password). • Acceptance o Phone number and email is uniq

Nov 15, 2021
Comments
  • issue in ./rabbitmq-http

    issue in ./rabbitmq-http

    $sudo ./rabbitmq-http -address="127.0.0.1:8080" -amqp="amqp://guest:guest@localhost:5672/"

    output is sudo: ./rabbitmq-http: command not found

    not as expected HTTP Response 200 OK 405 Method Not Allowed 500 Internal Server Error

Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Nov 21, 2021
A lightweight transactional message bus on top of RabbitMQ

grabbit A lightweight transactional message bus on top of RabbitMQ supporting: Supported Messaging Styles One Way (Fire and forget) Publish/Subscribe

Dec 22, 2022
Ecommerce-api - Rest api of e-commerce web application
Ecommerce-api - Rest api of e-commerce web application

E-commerce Rest API Swagger documentation to test api Domain diagram

Jan 2, 2023
An easy, fluent way of building URLs via chainable methods written in Go(lang)

Burl - a fluent URL builder Burl provides an easy, fluent way of building URLs via chainable methods. How to install go get github.com/mr-cryka/burl Q

Feb 5, 2022
This is a simple URL shortner Go Lang client that uses the short.io

Opinionated URL Shortner Client This is a simple URL shortner Go Lang client that uses the short.io TL;DR One liner (for my use case) ./short.io -key

Feb 11, 2022
High performance Copy-on-write gop cache code

PLEASE USE joy5 INSTEAD joy5 High performance Copy-on-write gop cache code Better av.Packet design code JOY4 Golang audio/video library and streaming

Jun 24, 2022
Simple Bank is a simple REST API that allows users to perform transferences with each other.

Simple Bank is a simple REST API that allows users to perform transferences with each other. ?? Technologies Golang Docker PostgreSQ

Feb 15, 2022
Sample Go REST API implementation with DDD using Clean Architecture.

This layer is a part developed for client-side (mobile, web, etc.) applications to access our domain. It will forward the requests from this layer to the application layer and expose the response it receives from the application layer.

Jan 3, 2023
Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and GraphQL.

Go GraphQL Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and Gr

Oct 15, 2021
This product about make link to be short link with golang rest api

This project using golang with go fiber, firebase, and dependency injection

Oct 13, 2021