RabbitMQ官方的HTTP API文档地址

  1. https://pulse.mozilla.org/api/

HTTP API 发送信息

URL

  1. http://username:passward@IPADDRESS:PORT/api/exchanges/%2f//publish

示例

  1. http://admin:admin@192.168.1.41:15672/api/exchanges/%2f//publish

请求方式

  1. POST

参数

  1. {
  2. "properties":{},
  3. "routing_key":"test.msg.queue",
  4. "payload":"滴滴滴滴",
  5. "payload_encoding":"string"
  6. }

复杂对象可以直接传json

  1. {
  2. "properties":{},
  3. "routing_key":"test.msg.queue",
  4. "payload":"{\"name\":\"zhangsan\",\"age\":18}",
  5. "payload_encoding":"string"
  6. }

返回

  1. {
  2. "routed": true
  3. }